in reply to
Check if "System" was succesful
but for a system related WTDI,
my $result = system("copy bleh blah");
#system returns opposite ... IIRC
print "oh no!\n";
The usual (and slightly more compact) way to check a system call is:
system( $cmd ) == 0 or die "System call failed: $!";
The " == 0" deals with the fact that system returns 0/false on success, not true like most perl functions.
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.
Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Results (615 votes),