in reply to Help with loops
@email = ($email,$pscemail1,$pscemail2,$pscemail3,$pscemail4,$pscemail5,$pscemail6,$pscemail7,$pscemail8);
You already have a solution thanks to brother Discipulus so here's just an additional handy hint. Every time you find yourself appending a digit to the name of a scalar variable ask yourself the question, "Should I be using an array here instead?".
The answer is almost invariably, "Yes!".
We haven't seen your code which sets values (or not) for $pscemail1, $pscemail2, etc. but why not try just using a single @pscemail array instead and see how much neater it might make your code? HTH.
"It doesn't work" is as useful to a developer as "I'm ill" is to a medic. Be specific.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help with loops
by htmanning (Friar) on May 06, 2016 at 04:47 UTC | |
by Anonymous Monk on May 06, 2016 at 06:35 UTC |