Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Perl Style: Is initializing variables considered taboo?

by james2vegas (Chaplain)
on Aug 25, 2010 at 17:16 UTC ( [id://857252]=note: print w/replies, xml ) Need Help??


in reply to Perl Style: Is initializing variables considered taboo?

For sheer perversity, thanks to http://blogs.perl.org/users/josh_ben_jore/2010/08/ponies-are-the-truth.html:
&Internals::SvREADONLY( \undef, 0); ${ \undef } = 'true'; &Internals::SvREADONLY( \undef, 1); my $x; my $y = undef; if ($x) { print "x => $x - true\n" } if ($y) { print "y => $y - true\n" }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-03-19 05:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found