my($no) = unlink $targ || carp "Unable to delete file $targ\n";
This doesn't explain your deletion problem, but you most likely meant
my $no = unlink $targ or carp "Unable to delete file $targ\n";
As you have it, the carp would only ever fire if $targ is false (e.g. ""), but not when the unlink failed.
In reply to Re: unlink fails to delete files with perculiar names
by Eliya
in thread unlink fails to delete files with perculiar names
by DaveARoberts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |