in reply to Parsing a comma delimited file

Never use backslashes in filenames, even on windows, if you change c:\doclist.chr to c:/doclist.chr and change c:\doclist.txt to c:/doclist.txt, you won't get that error (although there are many easier ways to do what you are attempting).

Replies are listed 'Best First'.
Re: Re: Parsing a comma delimited file
by tachyon (Chancellor) on Feb 13, 2003 at 14:35 UTC

    Never use backslashes in filenames

    Why not? This works fine:

    $filename = "C:\\foo.txt"; # as does this $filename = 'C:\foo.txt'; # but this won't because perl thinks the \ relates to the ' $path = 'C:\some\path\'; $fullpath = $path . $filename; # however this is fine $path = "C:\\some\\path\\";

    For more on this subject see Paths in Perl

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print