Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: System() in list mode?

by 1337John (Initiate)
on Oct 17, 2011 at 21:37 UTC ( #932017=note: print w/replies, xml ) Need Help??

in reply to Re: System() in list mode?
in thread System() in list mode?

Well yea... it uses execvp(). Which should work no?

Replies are listed 'Best First'.
Re^3: System() in list mode?
by onelesd (Pilgrim) on Oct 17, 2011 at 21:45 UTC
    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.


    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?

        There's no "supposed to" about it.

        Use the multi-arg form if you want to run a program.
        Use the single-arg form if you want to execute a shell command.

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

        You can use $WHAT in like this. Notice the space.

        system('env', 'WHAT=bar', '/Users/onelesd/Work/space/a space/') ;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://932017]
[choroba]: Especially the "Real Time" link
[choroba]: I can confirm it shows a lightning at the moment it strikes

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2018-05-23 21:43 GMT
Find Nodes?
    Voting Booth?