Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Bad file descriptor after vmran command using system()

by daxim (Chaplain)
on Apr 08, 2013 at 12:52 UTC ( #1027495=note: print w/ replies, xml ) Need Help??


in reply to Bad file descriptor after vmran command using system()

You're using system() incorrectly, specifically its return value. The error message is misleading, $! contains junk from a previous system call. Using system() correctly is very difficult, have a peek at the official documentation. All Perl built-ins suck, this one sucks the most.

Instead use autodie for proper error handling, it's tested and you get nice default error messages:

use autodie qw(:all); # replaces system() system $command; # implicit error handler


Comment on Re: Bad file descriptor after vmran command using system()
Download Code
Replies are listed 'Best First'.
Re^2: Bad file descriptor after vmran command using system()
by Anonymous Monk on Apr 08, 2013 at 20:46 UTC

    All Perl built-ins suck, this one sucks the most.

    Low level functions are low level functions, this doesn't mean they suck, they're just low level

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2015-07-31 03:45 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 (274 votes), past polls