cptmike has asked for the wisdom of the Perl Monks concerning the following question:

On a Win32 system, how does one open a file with a $ in the file hame? Example mdns.$catalog Renaming the file is not an option. If the above file name is passed to a Perl script the file can't be found. If I remove the $ from the name the file is then opened. Escaping the $ does not seem to solve the problem.

Replies are listed 'Best First'.
RE: Opening files with a $ the name
by chromatic (Archbishop) on Feb 03, 2000 at 01:48 UTC
    On a WinNT system here, I had good luck with the following:
    perl -w use strict; local *INPUT; open (INPUT, 'catalog.$test') || die "Error: $!\n"; print while (<INPUT>); close INPUT || die "Worse Error: $!\n";
    Remember, there is no variable interpolation in single-quoted strings. (Strange, though, that "catalog.\$test" didn't work for you. Try using -w and strict.)