in reply to Regex on array elements during push
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regex on array elements during push
by Roy Johnson (Monsignor) on Mar 22, 2004 at 20:46 UTC | |
by carric (Beadle) on Mar 22, 2004 at 21:05 UTC | |
by QM (Parson) on Mar 22, 2004 at 23:12 UTC | |
by Roy Johnson (Monsignor) on Mar 23, 2004 at 14:56 UTC |