in reply to apply a regular expression to glob'd filenames
grep returns items from a list for which the predicate returns true. You want to map the list of matching filenames to remove the extension.
@wetransfer_fix = map { (my $t = $_) =~ s/\.tif//; $t } grep # ...as b +efore...
Also someone else mentioned in the chatterbox that you might want to change how you're doing error handling on your initial chdir and die so you don't continue trying to run in the wrong directory.
unless( chdir( $wetrasnfer ) ) { my $chdir_error = $!; ## In case mail() clobbers old value mail( ... blah ... ); ## send email notification die qq{Couldn't send error mail: $chdir_error\n}; }
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|