open $in,  '<', 'flr-infile.dat';
open $out, '>', 'flr-outfile.dat';

while ($n=sysread($in, $record, 80)) {   
     syswrite $out, reverse $record;     
     print reverse($record)."\n"         
}
close $out;