keiusui has asked for the wisdom of the Perl Monks concerning the following question:
I have five variables called $website_1, $website_2, $website_3, $website_4 and $website_5.
Is there a way to loop through these variables?
I tried the following to no avail:
for($x = 1; $x <= 5; $x++) { print $website_$x; }
Any help would be gratefully appreciated. Thank you.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: looping through variables
by davidrw (Prior) on Jul 04, 2006 at 02:55 UTC | |
by SadPenguin (Novice) on Jul 05, 2006 at 00:32 UTC | |
Re: looping through variables
by GrandFather (Saint) on Jul 04, 2006 at 03:29 UTC | |
by ikegami (Patriarch) on Jul 04, 2006 at 05:34 UTC | |
Re: looping through variables
by kwaping (Priest) on Jul 04, 2006 at 03:19 UTC | |
| |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Back to
Seekers of Perl Wisdom