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

Re: Bad return value from a block with variable localization

by BrowserUk (Pope)
on Apr 10, 2006 at 08:59 UTC ( #542235=note: print w/replies, xml ) Need Help??


in reply to Bad return value from a block with variable localization

As a temporary workaround until the bug is fixed, the following seems to 'cure' it and I can't see any other side effects:

sub bar { if (@_) { return my $x = do { my $dummy; 1; }; } return 0; }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2019-11-20 14:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (97 votes). Check out past polls.

    Notices?