The fix suggested (unlink glob("$prefix$runid.*") or ...) will only report an error if no files can be unlinked. If only some files cannot be unlinked, no error will be reported. You probably want
unlink $_ or print "Error removing file \"$_\": $!\n" for glob("$prefix$runid.*");
I also doubt $! is set properly, especially when processing multiple files.
In reply to Re: unlink glob
by ikegami
in thread unlink glob
by rbm1213
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |