in reply to modify list through grep

What, nobody remembers grep in grep BLOCK LIST usage?!

@l = qw( a b c ); # '@m' just as well be '()' unless used later, but then I personally # would be doing C</a/ and $_ = 'z' for @l;>. @m = grep { /a/ and $_ = 'z' } @l; print @l;

And a different take on reply from Sidhekin ...

/a/ and $_ = 'z' for @l;

~Nov 26 2006, 7p US-EDT: Changed '@p' to '@l'.