If an array of references suffices then:
use strict; use warnings; my @l = ( "a", "b", "c" ); my @m = map {\$_} grep /a/, @l; ${$m[0]} = "z"; print @l;
seems to do what you want:
zbc
In reply to Re: modify list through grep
by GrandFather
in thread modify list through grep
by syntactic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |