in reply to Perl range

You can also use the -l switch to automatically append a line terminator for each print operation, thus allowing print to output $_ by default.

perl -le 'print for reverse(5 .. 9), 12 .. 18;'

I hope this is of use.

Cheers,

JohnGG