Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Object Label Badly Formattedby Tanktalus (Canon) |
on Mar 05, 2005 at 15:35 UTC ( [id://436908]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|