Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: system() requires double ctrl-c

by saintmike (Vicar)
on Nov 10, 2008 at 08:40 UTC ( #722580=note: print w/replies, xml ) Need Help??


in reply to Re: system() requires double ctrl-c
in thread system() requires double ctrl-c

For people that do error checking, it's not a problem. die if !system("some_long_running_shell_command");
You mean die if system(...) as system returns 0 on success ... ok, this works for simple scripts, but in the general case you might want the script to handle the error instead of dying.

Replies are listed 'Best First'.
Re^3: system() requires double ctrl-c
by ikegami (Patriarch) on Nov 10, 2008 at 09:17 UTC

    Oops! So used to "if!" or "or" to catch errors. Fixed.

    As for the simplicity, it was just an example. You're right that it's really not suitable for use. The docs for system provide a more complete example.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2022-08-09 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?