Re: Perl-Win32-Web Digest, Vol 32, Issue 1
by David Landgren other posts by this author
Jan 7 2007 2:17AM messages near this date
view in the new Beta List Site
Re: Perl-Win32-Web Digest, Vol 32, Issue 1
|
Perl/Binmode issue
Charles Pelkey wrote:
> Try the following:
>
> open(DLFILE, "<$files_location\test.pdf") or die "Could not open file
\t is interpreted as a tab character. This is why it fails.
When using \ as path separators they must always be escaped, hence
open(DLFILE, "<$files_location\\test.pdf") or die "Could not open file
or, a little less ugly and more cross-platform, use forward slashes;
Perl will know what to do.
open(DLFILE, "<$files_location/test.pdf") or die "Could not open file
Also, the three-arg form is safer:
open(DLFILE, "<", "$files_location/test.pdf")
David
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Charles Pelkey
David Landgren
|