in reply to Re: Switching the Order of Lines
in thread Switching the Order of Lines

In order to print the whole file reversed, it is easier to slurp it into a string:

perl -e "local $/; print scalar reverse <>" coderef.pl

Replies are listed 'Best First'.
Re^3: Switching the Order of Lines
by Laurent_R (Canon) on Oct 29, 2013 at 16:16 UTC

    Yes, indeed, you are right. I wanted to keep the two-step approach shown by others before, but there is no real reason to do so.