Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Hash (not) returned by subroutine

by afoken (Canon)
on Jan 27, 2020 at 23:41 UTC ( #11111954=note: print w/replies, xml ) Need Help??


in reply to Re^3: Hash (not) returned by subroutine
in thread Hash (not) returned by subroutine

Doesn’t such a method make the behavior of a programming language unpredictable?

Not if perl is sure that the situation allows optimizing out.

I would blindly assume that all returns could be optimized out in this script:

sub foo { # do something return; } sub bar { # do something return 'a scalar'; } sub baz { # do something return qw( a list ); } foo(); bar(); baz(); exit();

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2020-05-25 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (145 votes). Check out past polls.

    Notices?