Zubinix has asked for the wisdom of the Perl Monks concerning the following question:
to print out the numbers from 1 to 10? That is specify a range to use in the for loop programmatically? Thanksmy $range = "1..10" for my $x ($range) { print "$x\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Specifying a range through a variable
by dragonchild (Archbishop) on Sep 19, 2008 at 02:16 UTC | |
by Zubinix (Acolyte) on Sep 19, 2008 at 02:26 UTC | |
by syphilis (Archbishop) on Sep 19, 2008 at 02:45 UTC | |
by dragonchild (Archbishop) on Sep 19, 2008 at 13:40 UTC | |
by kyle (Abbot) on Sep 19, 2008 at 02:32 UTC | |
by Zubinix (Acolyte) on Sep 19, 2008 at 02:37 UTC |