Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Trying to learn about References

by AidanLee (Chaplain)
on Jan 04, 2002 at 22:19 UTC ( [id://136330]=note: print w/replies, xml ) Need Help??


in reply to Re: Trying to learn about References
in thread Trying to learn about References

A warning to the reader -- what talexb has done using the ||= operator is valid and useful, but has a catch. It isn't truly a default-setting operator (see Perl 6's //= operator) but rather a "set me to the following value if my current value evaluates to false".

Note that any time a false value is a valid value for your variable, using the ||= to set the default will fail to produce the desired results.

  • Comment on Re: Re: Trying to learn about References

Replies are listed 'Best First'.
Re (tilly) 3: Trying to learn about References
by tilly (Archbishop) on Jan 07, 2002 at 18:48 UTC

Log In?
Username:
Password:

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

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

    No recent polls found