in reply to looping through variables

I agree that an array would be a much better tool for this job. However, with that said, I'd like to show you how it could be done, if you were dead-set on doing it that way.
use strict; use warnings; my $website_1 = 'a'; my $website_2 = 'e'; my $website_3 = 'i'; my $website_4 = 'o'; my $website_5 = 'u'; for (my $x = 1; $x <= 5; $x++) { print eval "\$website_$x"; }
This is neither good nor safe, but I just wanted to show that it was indeed possible.

---
It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.