in reply to Perl range
perl -le 'print for reverse(5 .. 9), 12 .. 18;' [download]
I hope this is of use.
Cheers,
JohnGG