Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Bad return value from a block with variable localization

by BrowserUk (Patriarch)
on Apr 10, 2006 at 08:59 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://542235]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-03-28 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found