Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

For Perl kids only!

by merlyn (Sage)
on Oct 11, 2000 at 22:48 UTC ( [id://36283]=note: print w/replies, xml ) Need Help??


in reply to RE (tilly) 2: Populate $!
in thread Populate $!

I think you're digging yourself a velvet-lined grave here.

Yes, for many Perl child programs, the trivial use of die in that child program propogates their errno to their exit code.

But for the rest of the real world, no such propogation ever takes place. I think if you survey the exit status of nearly all other programs, you'll find a simple +1 or -1 (255) exit status, which your code will correctly misinterpret. {grin}

So, feel free to post your code, but be sure the reader is clear that it is intended for Perl child processes only.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE (tilly) 1: For Perl kids only!
by tilly (Archbishop) on Oct 11, 2000 at 23:02 UTC
    Excellent points.

    This thread should stand as warning to those thinking of using that snippet. In the example that brought this up I will clearly document that both in the function, and in the name. The new name will be guess_system_error.

    OTOH I want to use this for Perl children, so it is still useful for me.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2025-07-09 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.