my $arr_ref = shift; foreach my $item (@$arr_ref) { $item .= "foo"; }