RosettaCodeData/Task/Fixed-length-records/Perl/fixed-length-records-2.pl
2023-07-01 13:44:08 -04:00

6 lines
168 B
Perl

{
local ($/, @ARGV) = (\80, 'infile.dat');
open my $out, '>', 'outfile.dat' or die $!;
print $out scalar reverse while <>; # can read fixed length too :)
close $out;
}