in reply to Switching the Order of Lines
Welcome to the monastery. Here was a quick test snippet that appears to give results similar to those you seek:
my $fn = shift @ARGS; @lines = (); open my $df, $fn or die $!; while ( $l = <$df> ) { chomp $l; unshift @lines, $l; } close $df; foreach my $l ( map{ $_ = reverse $_; $_; } @lines ) { print reverse $l, "\n"; }
Hope that helps.
|
|---|