##
use List::MoreUtils qw( apply );
@new = apply { chomp; } @old;
@new = apply { tr/a-z/n-za-m/; } @old;
####
sub func {
for (my $s = @_ ? $_[0] : $_) {
... do something with $_ ...
return $_;
}
}
$new = func($old);
@new = map func, @old;