There was a need to reformat the .GDL graph description file in the .DOT format. On the Internet, I found a script for PERL, but how sad it is, he kicks, because it contains the Linux CAT OC command. Windows, respectively, has no such concatenation command. What design can replace this command. Here is this fragment.

#!/usr/bin/perl use strict; my $FILE1 = $ARGV[0]; open(OUTFILE, ">".$FILE1.".dot") or die "File doesn't exist\n"; my $indata = `cat $FILE1`; 

I took this script here .

  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

 my $indata = do { local $/; open(my $fl, "<", $FILE1); <$fl> }; 

There are no checks for errors when opening a file, since when you run cat , an empty variable will also be obtained if it is not present.