in reply to apply a regular expression to glob'd filenames
my @wetrasnfer_fix = map /([0-9]*_[0-9]*)/, @wetransfer;
With 5.14+, you can also use the "return" substitution modifier:
my @wetrasnfer_fix = map s/\.tif$//r, @wetransfer;
Or, you can use split:
my @wetrasnfer_fix = map +(split /\./)[0], @wetransfer;
Note from stevieb: You should also handle the case when not only the chdir fails, but the mail fails, too.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: apply a regular expression to glob'd filenames
by flieckster (Scribe) on Oct 02, 2019 at 14:31 UTC |