Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Best method to capture return code from system calls?

by bwelch (Curate)
on Aug 24, 2005 at 14:25 UTC ( #486200=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    system( "cp /analysis/fasta1.fa /analysis2/fasta1.fa" ) 
        or die print "Can't copy fasta file: $! \n";
    
  2. or download this
    use strict;
    &doSystemCommand(  "cp /analysis/fasta1.fa /analysis2/fasta1.fa"  );
    ...
            die "Failed executing [$systemCommand]\n"; 
        }
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-07-29 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls