$/ = \8; # Read 8-byte records. Behind the scenes, Perl will do buffering of reads. $out_buffer .= blowfishify($_) while ; print OUTFILE $out_buffer; #### open BUF, '<', \$buffer or die "$!: Could not open buffer\n"; $/ = \8; $out_buffer .= blowfishify($_) while ; print OUTFILE $out_buffer;