A
Amer Neely
Read the FAQ plus numerous books I have on hand about a 'for' loop and
the '..' range operator. Every example I've seen assumes the list is in
ascending order.
I'm stumped as to the behaviour of a for loop I'm trying to get working.
for $year (1999 .. 2005)
{
print "$year,";
}
does what you would expect .. prints '1999, 2000, 2001, 2002, 2003,
2004, 2005'.
But thie:
for $year (2005 .. 1999)
{
print "$year,";
}
prints nothing. Pourqoui? What is going on that I don't see?
--
Amer Neely, Softouch Information Services
Home of Spam Catcher
W: www.softouch.on.ca
E: (e-mail address removed)
Perl | MySQL | CGI programming for all data entry forms.
"We make web sites work!"
the '..' range operator. Every example I've seen assumes the list is in
ascending order.
I'm stumped as to the behaviour of a for loop I'm trying to get working.
for $year (1999 .. 2005)
{
print "$year,";
}
does what you would expect .. prints '1999, 2000, 2001, 2002, 2003,
2004, 2005'.
But thie:
for $year (2005 .. 1999)
{
print "$year,";
}
prints nothing. Pourqoui? What is going on that I don't see?
--
Amer Neely, Softouch Information Services
Home of Spam Catcher
W: www.softouch.on.ca
E: (e-mail address removed)
Perl | MySQL | CGI programming for all data entry forms.
"We make web sites work!"