in reply to Re: Basic list manipulation, and a bit of map() confusion...
in thread Basic list manipulation, and a bit of map() confusion...

"for" over an array is optimized; this works just as well from a memory perspective:
for my $a_val (@a) { (my $s = $a_val) =~ s/x//g; push @b, $s if $s; }

Replies are listed 'Best First'.
Re^3: Basic list manipulation, and a bit of map() confusion...
by ikegami (Patriarch) on Feb 25, 2008 at 19:23 UTC
    Thanks. I suspected as much — I already realized naught-but-an-array was special — but I didn't have time to check it when I posted the grandparent.