in reply to Opening filenames with special characters

I think your code should work as-is. Maybe the problem is in some other part of it? If your open fails, be sure to print $! to find out why.

open my $fhandle, '<', 'foo*bar' or die "Can't read foo*bar: $!";

Replies are listed 'Best First'.
Re^2: Opening filenames with special characters
by Zadeh (Beadle) on Mar 14, 2007 at 17:13 UTC
    Thanks,
    It turns out the problem was specific to windows and the MVFS filesystem provided by ClearCase from IBM/Rational. The same filesystem viewed from *nix coincidentally doesn't have the problem when using sysopen()...ugh

    It also turned out that any other piece of software couldn't open these same kind of files with a '*' in it in windows/MVFS, and the error message from $! was something like "Invalid filename". Copying the file to a different filesystem like NTFS worked fine.

    Hope this obscure problem happens to someone out there at some point..
      aye, \/:*?"<>| are not valid characters in Windows file names.