in reply to Perl range

perl -e 'foreach $index (reverse( 5..9 ), 12..18) { print "$index\n" } +' #update: or perl -e 'print "$_\n" for reverse( 5..9 ), 12..18'

Replies are listed 'Best First'.
Re^2: Perl range
by drake50 (Pilgrim) on Oct 03, 2007 at 19:49 UTC
    Nice. I don't know why I didn't think of reverse!
      That explains your short node title. If you thought, "hey I want the reverse version of the range...", you might have put a title such "Reversing Perl range". In this case, there was a great chance that you would resolve it yourself without firing a node. The good side is you generated a pretty high attention and resulted in a pretty interesting thread :-)

      Update: I would FP this myself.


      Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!