Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Response from system or Exec

by arthas (Hermit)
on Nov 03, 2003 at 08:51 UTC ( #304051=note: print w/replies, xml ) Need Help??


in reply to Response from system or Exec

Just an addition, since you're mentioning exec() in the subject of your question.

While system() returns a value, be aware that exec() never returns, but replaces your program with the one you are calling using exec().

Michele.

Replies are listed 'Best First'.
Re: Response from system or Exec
by Abigail-II (Bishop) on Nov 03, 2003 at 09:59 UTC
    Actually, exec might return, if 1) perl doesn't need to call the shell to execute the command (that is, exec is either given more than one argument, or a string which has no characters (except whitespace) that are special to the shell), and hence will call execvp directly, and 2) the command can't be called (usually because the file doesn't exists, or due to permission problems).

    See perldoc -f exec.

    Abigail

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2019-07-23 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (24 votes). Check out past polls.

    Notices?