in reply to One liner to Check and undef hash elements
Problem 2:my $hash_has_non_undef = sub { while (my ($key, $value) = each %hash) +{ return 1 if defined $value } 0 }->();
@hash{keys %hash} = ();
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: One liner to Check and undef hash elements
by crenz (Priest) on Apr 16, 2003 at 10:37 UTC | |
by merlyn (Sage) on Apr 16, 2003 at 11:08 UTC | |
by Aristotle (Chancellor) on Apr 16, 2003 at 11:20 UTC | |
|
Re^2: One liner to Check and undef hash elements (shortcircuiting)
by Aristotle (Chancellor) on Apr 16, 2003 at 11:38 UTC | |
by merlyn (Sage) on Apr 16, 2003 at 11:46 UTC | |
by Aristotle (Chancellor) on Apr 16, 2003 at 11:53 UTC |