drake50 has asked for the wisdom of the Perl Monks concerning the following question:
But, is there a nice way to do this-->perl -e 'foreach $index (5..9, 12..18) { print "$index\n" }'
perl -e 'foreach $index (9..5, 12..18) { print "$index\n" }'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl range
by FunkyMonk (Bishop) on Oct 03, 2007 at 19:23 UTC | |
by drake50 (Pilgrim) on Oct 03, 2007 at 19:49 UTC | |
by naikonta (Curate) on Oct 04, 2007 at 16:55 UTC | |
|
Re: Perl range
by johngg (Canon) on Oct 03, 2007 at 20:29 UTC | |
|
Re: Perl range
by mwah (Hermit) on Oct 03, 2007 at 19:55 UTC | |
by Firefly258 (Beadle) on Oct 06, 2007 at 04:44 UTC | |
|
Re: Perl range
by ikegami (Patriarch) on Oct 03, 2007 at 20:09 UTC |