fishy
Recent Actions
-
Commented on How each drove me crazy
Also see Do not use each...
-
Commented on Carrying (mini)CPAN
I will think about creating a wrapper. At least your comment sparked me to also have a look at the command line options of minicpan: -l, -r and -C. Thanks brian....
-
Posted Carrying (mini)CPAN to fishy
Thanks to minicpan, I keep a local copy of the latest versions hosted on CPAN.
My .minicpanrc file:
local: /home/netbook/minicpan/miniCPAN_20140405/
remote: http://your.favorite.cpan.mirror/
also_mirror: indic… -
Posted Computer languages comparison. What else? to fishy
Intro
about comparing percentages I have to contribute my…
Comment Threads
-
Aristotle commented on
How each drove me crazy
Actually this is a case where
each
could be fine, because the loop body is not making any calls to other code that could be messing with the hash’s iterator. He just has to reset the iterator every time he wants to start over:sub test_it { my $entry = shift; keys %regex; # reset iterator while( my($type, $regex) = each %regex) { return 1 if $entry =~ /$regex/; } return 0; }
Of course since he doesn’t use the keys in this example, it’s a pointless exercise to use
each
rather thanvalues
.…
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.