Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Return statement in subroutine(s) is necessary when not returning anything?

by Anonymous Monk
on Nov 02, 2015 at 23:10 UTC ( [id://1146774]=note: print w/replies, xml ) Need Help??


in reply to Re: Return statement in subroutine(s) is necessary when not returning anything?
in thread [SOLVED] Return statement in subroutine(s) is necessary when not returning anything?

P.S. Another argument for an explicit return:

sub foo { print "I am foo\n"; bar(); }

Can you tell me what context the call to bar() is in? Nope, not from this code! (Answer: It's the same context as foo is called in.) There is a discussion in this thread.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found