- or download this
my @users = map { my $s = $_; # Protect the caller.
chomp($s);
$s =~ s/^\Q$MAIL_ROOT//;
$s } `find ...`; # Return the changed value.
- or download this
use List::MoreUtils qw( apply );
my @users = apply { chomp; s/^\Q$MAIL_ROOT//; } `find ...`;
- or download this
use Algorithm::Loops qw( Filter );
my @users = Filter { chomp; s/^\Q$MAIL_ROOT//; } `find ...`;