in reply to Re: Re: Re: Regex on array elements during push
in thread Regex on array elements during push
For instance, these are equivalent:
When map is used for good, it makes the code easier to read, and the dataflow easier to follow. But it can be abused, just like anything else useful.my @x; foreach ( 0..9 ) { push @x, $_ }; my @x; @x = grep 1, 0..9; my @x; @x = map $_, 0..9;
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|