push @array, map { (my $x = $_) =~ s/[?\s,]+//g; $x } grep { /\S/ } $ts->rows;
Nice and readable (at least to Juerd and me ... *grins*) And, yes, I actually have this construct in production code, sometimes 4 and 5 levels deep.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
In reply to Re: Regex on array elements during push
by dragonchild
in thread Regex on array elements during push
by carric
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |