Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Setting $! in xs

by Prof Vince (Friar)
on Aug 06, 2011 at 20:48 UTC ( #918997=note: print w/ replies, xml ) Need Help??

in reply to Setting $! in xs

Just assign to errno in your C code. $! is magic, so it will be automatically updated the next time it is evaluated in Perl.

But you should do that only if the error code you want to pass this way is a meaningful errno code (for example, if it is given after a system call). For all the other cases, an exception is a much saner solution.

Comment on Re: Setting $! in xs

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2015-11-27 11:40 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (726 votes), past polls