in reply to Re^2: Passing commands to subroutines
in thread Passing commands to subroutines

Given that you're facing a problem with tricky file names, the easiest substitute I could imagine for fixing a line of code like this:
system("program $ref_file > $outfile");
would be to do it like this:
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;
That ought to take any sort of goofy file name safely in stride (for both input and output files).

Replies are listed 'Best First'.
Re^4: Passing commands to subroutines
by Anonymous Monk on Jul 02, 2009 at 05:09 UTC
    Probably easier to use one of the IPC:: modules, maybe IPC::Cmd