use strict; use warnings; my @l = ( "a", "b", "c" ); my @m = map {\$_} grep /a/, @l; ${$m[0]} = "z"; print @l; #### zbc