in reply to Reading the contents of a file from the bottom up

Obligatory one-liner, using tac:
$ export MAX=6;tac YOUR-FILE.txt | perl -lane '$seen{$_}++ or push @ou +t,$_ for @F}{print join(q| |,@out[0..$ENV{MAX}||$#out])' 21 22 23 24 17 18 19
MAX is set to One less than the number of entries you want(a quirk of zero-based arrays).
If not set, the entire array is printed.

                "From there to here, from here to there, funny things are everywhere." -- Dr. Seuss