in reply to problem in running UNIX command through perl

Check the status of your command using system, and try getting rid of all those quotes:
my $cmd = "egrep -f $_proj_file $_running_file > $_admin_temp_file"; print $cmd, "\n"; my $result = system $cmd; print "result of egrep = $result\n"

Replies are listed 'Best First'.
Re^2: problem in running UNIX command through perl
by marcussen (Pilgrim) on Oct 28, 2008 at 00:53 UTC

    The quotes shouldn't interfere and would be required if he had spaces in his filenames for example

    Confucius says kill mosquito unless cannon
      It sometimes makes the code more readable to delimit strings in qq{}:
      my $cmd = qq{ egrep -f "$_proj_file" "$_running_file" > "$_admin_temp_ +file" }; my $result = `$cmd`; # or even qx{$cmd}
      That keeps you from having to escape quotes, etc.