in reply to Re^2: System command not working
in thread System command not working
#!/usr/bin/perl -wn BEGIN{ use strict; my $outFile= "output.txt"; my $inFile= "infile.txt"; $main::start=17; # 'my' in this scope will result in uninitialized va +lues outside the BEGIN{} block $main::end=30; close STDOUT; close STDIN; open STDIN,"<",$inFile || die $!; open STDOUT,">",$outFile || die $!; } print if $. >= $start && $. <= $end;
|
|---|