Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: System() in list mode?

by onelesd (Pilgrim)
on Oct 17, 2011 at 21:13 UTC ( #932012=note: print w/replies, xml ) Need Help??


in reply to System() in list mode?

4. I successfully did this using system() in scalar context (one string arguement, ok it's not actually scalar but w/e).

When you use system with LIST context the subsequent command is not run in a shell. When you use it with one scalar argument the command is run in a shell.

Replies are listed 'Best First'.
Re^2: System() in list mode?
by 1337John (Initiate) on Oct 17, 2011 at 21:37 UTC
    Well yea... it uses execvp(). Which should work no?
      There is no shell in LIST mode so setting a PATH variable doesn't have the effect you are looking for. You need to provide full paths to files/binaries, such as /bin/bash.

      Edit:

      No need to be an a$$ to people taking time out of their lives to help you.

        So how would you use system() when your program's path has spaces in it?
        From what I've read it seems as though I'm supposed to use LIST mode?

        So then how would you use system() if your program's path name has spaces in it?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://932012]
help
Chatterbox?
[Eily]: I've posted my fourth root node on perlmonks and I haven't even been a monk for four years yet. I'm on fire \o/
[ambrus]: Eily: hmm... do you count your user and your scratchpad as root nodes you posted?
[Eily]: I would have if it had been convenient :P
[hippo]: Those are auto-posted. We just update them.
[LanX]: "you haven't been a monk" ???
[LanX]: oh "yet" .. got it

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2017-03-24 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (304 votes). Check out past polls.