Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Illegal Seek from system() with no output from $?

by lestrrat (Deacon)
on Mar 27, 2002 at 02:56 UTC ( [id://154570]=note: print w/replies, xml ) Need Help??


in reply to Illegal Seek from system() with no output from $?

I think system() returns the exit status of the command ( i.e. $? ) -- so if your command executed properly, then it would most likely return a 0, which is a logical "false" for perl. So you need to warn when:

system( "$your_command" ); if( $? != 0 ) { warn "something's wrong"; } ## or ## ( system( "$cmd" ) == 0 ) or warn "the sky is falling!"; ##

I don't know about the illegal seek stuff, but I used to get a lot of that when I would have bogus errors ( i.e. my bug ) in the code. It's probably just that $! was never meant to be set when you checked for it ( however, I'm no expert on this subject, so please take that statement with a grain of salt )

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-26 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found