in reply to Re: Re: DOS directory naming in PERL?
in thread DOS directory naming in PERL?

(grin). Sorry, I'm so used to writing Unix code that reads and writes to DOS-style files that I automatically did it.

So you are saying that the Dos/Win32 version of PERL correct interprets \n as the CR/LF combo? Interesting.

  • Comment on Re: Re: Re: DOS directory naming in PERL?

Replies are listed 'Best First'.
Re: Re: Re: Re: DOS directory naming in PERL?
by Fastolfe (Vicar) on Jan 19, 2001 at 23:28 UTC
    See perldoc perlop, and look for "Quote and Quote-like Operators". \n is "virtual" with respects to Perl in that does not map to a single ASCII byte irrespective of OS. It assumes the OS's representation of a "newline". Under Unix, this is equivalent to \cJ. Under DOS/Windows, it's \cM\cJ. Likewise, I think \r behaves differently under MacOS as well, for the same reasons.