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

Re: Redirect output of the system() command

by NetWallah (Abbot)
on Jul 11, 2012 at 05:20 UTC ( #981007=note: print w/ replies, xml ) Need Help??


in reply to Redirect output of the system() command

Your "system" call may be getting confused because you have used "qw()", and your options contain quoted text that you expect to be retained as a single array element.

When you feed "Here is our Title" to qw(), you would end up with 4 elements, not one. This would result in positional parameters being in the wrong place.

             I hope life isn't a big joke, because I don't get it.
                   -SNL


Comment on Re: Redirect output of the system() command
Re^2: Redirect output of the system() command
by monsoon (Pilgrim) on Jul 11, 2012 at 05:37 UTC
    'system' takes a list. @options gives it that list in exactly the order that was specified by 'qw'. Space separated items can be combined into a single string or can be standalone list items. Now how would in this case the positional parameters end up in the wrong place?
      See Your Mother's comments below.

      I wasn't clear in my previous node - what I meant by "wrong place" was that multiple spaces would be collapsed in a quoted string. (or maybe I'm making that up now - can't remember what I was thinking).

                   I hope life isn't a big joke, because I don't get it.
                         -SNL

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2014-07-30 08:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls