in reply to Re: Object Label Badly Formatted
in thread Object Label Badly Formatted
I'm not sure that while (<$pdf_name>) works properly in binmode. You should be using read or sysread. In other words, don't read line-by-line when you've just told perl that it's a binary file. The second (new) code snippet doesn't read by line - it slurps the entire file as-is, with no translation. To get your while to work, just set local $/ = \1024 to read in 1024-byte chunks.
|
|---|