Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Are "$hash{$_} ||= 1 + keys %hash" and variants well defined or not?

by zshzn (Hermit)
on Jan 12, 2006 at 21:08 UTC ( [id://522809]=note: print w/replies, xml ) Need Help??


in reply to Are "$hash{$_} ||= 1 + keys %hash" and variants well defined or not?

I don't see specifically why it shouldn't. At first look one would assume they would do the same thing, having it otherwise appears to be illogically and prone to cause issues for unsuspecting programmers.
  • Comment on Re: Are "$hash{$_} ||= 1 + keys %hash" and variants well defined or not?

Replies are listed 'Best First'.
Re^2: Are "$hash{$_} ||= 1 + keys %hash" and variants well defined or not?
by demerphq (Chancellor) on Jan 12, 2006 at 21:14 UTC

    I've updated it to show the results I get... You will probably be surprised.

    ---
    $world=~s/war/peace/g

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-23 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found