Timwi (timwi) wrote in perl, @ 2004-10-21 00:11:00 Continued problems with binary files Dear hackers again, thanks for your hints in the previous entry. However, I'm still having problems here. How do I simply load a file into memory? Again, without corrupting any line endings? I've tried this: #!C:\Perl\bin\perl.exe use strict; print "Content-Type: image/jpeg\n\n"; local $/ = undef; open F, 'C:\Temp\temp.jpg'; binmode F; my $content = ; close F; print $content; and this produces a corrupt response. What is the correct way of loading a binary file? Thanks for any help in advance.