At 8:14 PM -0600 9/13/03, Doug McNutt wrote:Icon\r files appear when, in earlier Mac OS's, a folder ...
This is interesting, but it doesn't answer the question of how one opens a file with this sort of name weirdness. Basically, I think I've found a bug. Prolly should check for it in Panther...
There is no problem with opening a file with a CR in its name.
The problem is only with a file who ends in any sequence of carriage returns or line feeds. It would appear these are stripped from the file name by perl (presumably trying to be helpful so you can open a file even if the name is read from a file and you forget to chomp it).
It looks like the pattern stripped is [\r\n]*$ which is a shame. If it was \r?\n? then you could "fix" it by appending \r\n to the file name to ensure it was stripped and you were left with your name unmangled.
The only thing I can think of is:
try sysopen and see if it has the same hack
or
try Mac::Carbon and see if you can use it to access the file some how (or potentially rename the file, access it and rename it back).
Enjoy, Peter.
-- <http://www.interarchy.com/> <http://documentation.interarchy.com/>