http://www.perlmonks.org?node_id=616471


in reply to Re^2: Passing user input to a shell command
in thread Passing user input to a shell command

Did you try this?

print "$_\n" for qw "perl /Users/james/perlstuff/macc/macc1 $file";