in reply to Re^2: Passing commands to subroutines
in thread Passing commands to subroutines
would be to do it like this:system("program $ref_file > $outfile");
That ought to take any sort of goofy file name safely in stride (for both input and output files).open( PROG, "-|", "program", $ref_file ) or die "can't launch 'program +' on $ref_file: $!\n" open( OUT, ">", $outfile ); while (<PROG>) { print OUT; } close PROG; close OUT;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Passing commands to subroutines
by Anonymous Monk on Jul 02, 2009 at 05:09 UTC |