good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: How to Save a variable outside of a loopby RonW (Parson) |
on Jul 31, 2015 at 21:33 UTC ( [id://1137065]=note: print w/replies, xml ) | Need Help?? |
By declaring your variables inside the loop, they are being redeclared each time the loop executes. If you move your declarations before the loop, it should work:
In Section
Seekers of Perl Wisdom
|
|