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