in reply to Re: arrays
in thread Count how many of each type in an array
Let me add the caveat that since the
construction makes $_ an alias for the current element being processed, that your number stripping substitution modifies the original array, which may or may not be appropriate. To non-destructively process the array, you might capture before the first digit to get your hash key.foreach (@foo ) { }
If not P, what? Q maybe?
"Sidney Morgenbesser"
In Section
Seekers of Perl Wisdom