Wednesday, May 24, 2000, 8:58:59 PM, khizar wrote:
> i am trying to read a file <FILEHANDLE>
> before this i use the foll code
> if (-B $filepath) {binmode FILEHANDLE;}
...
> this code works fine for all files EXCEPT PDF files where it fails to
> detect the PDF file as binary file and hence binmode (FILEHANDLE) is not
> executed
What leads you to believe that PDF files *should* be recognized as
"binary"? There is no magic "I am a binary file" bit in the directory.
As far as I know, Perl looks at some portion of the beginning of the
file to determine whether the file is binary or not. The PDF files
I've looked at in WordPad sure look pretty much like text files, at
least at the beginning.
So, if you know that you are going to be dealing with PDF files, you
had better test for them explicitly, as has already been suggested.
Ron.
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]