http://qs1969.pair.com?node_id=248166


in reply to Re: arrays
in thread Count how many of each type in an array

Let me add the caveat that since the

foreach (@foo ) { }
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.

If not P, what? Q maybe?
"Sidney Morgenbesser"