Klem has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to read a file that I encrpted using the Crypt::Blowfish_PP module. My problem is that when I try to read the encrypted file using read() or sysread() they stop reading unexpectedly at 115 bytes even though -s tells me the file is 2458 bytes long. the code I am using to read is as follows
my $in; open IN, "out.txt" or die "can't open IN\n"; open OUT, ">unencrypted.txt" or die "can't open OUT\n"; my $len = (-s IN); print "len= $len\n"; #shows 2458 $len = sysread(IN, $in, (-s IN)); close IN; die "read= $len\n"; #shows 115 The file I am trying to read starts like this. 3߅m8&/3}{nş H1/߸R| 1/߸R| {n.3nRUW~H +I}n}֎`jCtZ^)X

Originally posted as a Categorized Question.