in reply to Declare Variable in Loop
Putting their declaration in the loop body limits their scope to the loop pass.
Maybe you should tell us what you want to do rather than telling us how you want to do it. My only guess is that you want
{ my ($variable1, $variable2); my @return_details; while (my $test = <TESTFILE>) { ... } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Declare Variable in Loop
by drodinthe559 (Monk) on Mar 26, 2010 at 22:27 UTC | |
by ikegami (Patriarch) on Mar 26, 2010 at 22:31 UTC | |
by drodinthe559 (Monk) on Mar 26, 2010 at 22:39 UTC | |
by ikegami (Patriarch) on Mar 26, 2010 at 22:45 UTC | |
by Anonymous Monk on Mar 26, 2010 at 22:41 UTC |