Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: exiting via next: Extra careful or just bitchy?

by allolex (Curate)
on Apr 19, 2004 at 19:06 UTC ( #346413=note: print w/replies, xml ) Need Help??


in reply to exiting via next: Extra careful or just bitchy?

next (perldoc -f next) is for skipping over a loop iteration. Since your subroutine does not appear to be a loop, you should probably use something like return (perldoc -f return) to exit the subroutine. Read the caveats in the documentation, though. ;)

--
Damon Allen Davison
http://www.allolex.net

  • Comment on Re: exiting via next: Extra careful or just bitchy?

Replies are listed 'Best First'.
Re: Re: exiting via next: Extra careful or just bitchy?
by Roy Johnson (Monsignor) on Apr 19, 2004 at 19:20 UTC
    Not exit! Maybe you mean return.

    The PerlMonk tr/// Advocate
      Not exit! Maybe you mean return.

      Indeed I did! And I typed the wrong one twice. I'll fix it now. Mysterious non-functioning code... ;)

      --
      Damon Allen Davison
      http://www.allolex.net

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://346413]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2016-12-07 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (132 votes). Check out past polls.