Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Passing user input to a shell command

by adrianh (Chancellor)
on May 20, 2007 at 16:21 UTC ( #616456=note: print w/ replies, xml ) Need Help??


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

You should not be using qw in the system call

Or, you should be using qw() but you need to fully specify the path to perl. That way you don't have to worry about $file having spaces in it.


Comment on Re^2: Passing user input to a shell command
Re^3: Passing user input to a shell command
by jdporter (Canon) on May 20, 2007 at 18:57 UTC

    Did you try this?

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://616456]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-12-26 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls