Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: misbehaving program

by BazB (Priest)
on Apr 22, 2005 at 23:48 UTC ( #450613=note: print w/ replies, xml ) Need Help??


in reply to Re: misbehaving program
in thread misbehaving program

My brain doesn't cope well with

system("command") and die "Error message: $?";

Although the above is perfectly valid - as system returns zero for success, unlike every other perl function I can think of - I'd much rather use:

system("command") == 0 or die "Error message: $?";
...which makes it much more obvious (at least to me) what's going on.

Although I note that the examples in the perldoc use the latter approach, this is mostly a personal style point/grumble: feel free to ignore it.


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.


Comment on Re^2: misbehaving program
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2015-07-02 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls