Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: "Subroutine basics" What does -1 mean ?

by mr_mischief (Monsignor)
on May 29, 2014 at 20:58 UTC ( [id://1087873]=note: print w/replies, xml ) Need Help??


in reply to Reaped: Re^3: "Subroutine basics" What does -1 mean ?
in thread "Subroutine basics" What does -1 mean ?

I'm guessing you're a little short in the humor department today. The chatterbox, by the way, is supposed to be ephemeral since we're harping on "convention" now.

Since you're bringing this back to starkly serious now, sometimes the best place to exit from a program is in an error-handling subroutine rather than three or four calls up the stack. In any case, the question was not about moving the exit() to a more suitable part of the code. It was a question of what the return code means, which depends on the operating environment since it's a return to that environment's control.

Now, is "Subroutine Basics" in SoPW the place to hint wildly at meaning about a tangential topic, or is the advice given about the difference between return and exit more appropriate?

  • Comment on Re^4: "Subroutine basics" What does -1 mean ?

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found