Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Exiting subroutine via next (that old chestnut)

by shmem (Chancellor)
on Mar 04, 2008 at 17:07 UTC ( #671937=note: print w/replies, xml ) Need Help??


in reply to Exiting subroutine via next (that old chestnut)

It is not an error, but a warning, and rightly so.

If you ever call that sub only from within a loop, all is fine. But if you call it with no loop around, perl dies because next has no target.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
  • Comment on Re: Exiting subroutine via next (that old chestnut)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2023-09-22 03:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?