Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Pronoun Programming

by eric256 (Parson)
on Feb 04, 2008 at 21:47 UTC ( [id://666119]=note: print w/replies, xml ) Need Help??


in reply to Pronoun Programming

What about:

for ($log_count{$key} ) { delete $_ if $_ == 0 }

I wonder if you could make a sub it() that returns $_ so you could say delete it if it == 0; :)


___________
Eric Hodges

Replies are listed 'Best First'.
Re^2: Pronoun Programming
by jdporter (Paladin) on Feb 04, 2008 at 22:38 UTC
    What about...

    What about it? Other than that it doesn't compile, I mean?

      Hehe very true. I was thinking of a regular scalar and just expanded it to the hash. It does seem kind of strange to me that delete $hash{$key}; works but $_ = $hash{$key}; delete $_ doesn't.


      ___________
      Eric Hodges

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-25 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found