I've had to deal with NT file names a lot lately.
I've had the most success escaping the entire
file name with \Q...\E,
which automatically quotes all pattern
metacharacters
(not just backslashes).
This would turn your unlink line into something like:
unlink "\Q$_\E" or die "\ncan't delete \Q$_\E\n";
Without the $! error message,
I can't say for sure this will fix your problem.
If it does, my guess is
that it would have to do with
something trying to expand the '$'
in the file names.
Update:You'll especially want the \Q...\E
around $_ in your die message so you can
read the file names.
Otherwise, the expansion in the double-quotes
starts interpreting \b
and \n and \r in the middle of your file name... | [reply] [d/l] |
You need to include $! in your "die" message. (You can also include $^E during debugging since it occasionally offers an extra hint). Then tell us what error you are getting.
-
tye
(but my friends call me "Tye")
| [reply] |