Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Passing user input to a shell command

by adrianh (Chancellor)
on May 20, 2007 at 16:21 UTC ( [id://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

Replies are listed 'Best First'.
Re^3: Passing user input to a shell command
by jdporter (Paladin) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://616456]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-25 08:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found