http://qs321.pair.com?node_id=498690


in reply to Iterate string like, for(1..5) i.e. $stirng="1..5"; for($string)

I would rather use a variable for each part of the range instead of trying to represent the whole range as a string to be evalled.

Yuck..Foo

#!/usr/bin/perl use strict; my $beg = 1; my $end = 5; for my $i ($beg..$end) { print "$i\n"; }