P is for Practical | |
PerlMonks |
Re^4: How to create loop in perl dynamicallyby johngg (Canon) |
on Sep 26, 2012 at 14:31 UTC ( [id://995785]=note: print w/replies, xml ) | Need Help?? |
By default the loop variable is held in $_ but you can assign to a variable if you wish. It is not a good idea to alter loop variables inside the loop, that leads to all sorts of grief.
I hope this is helpful. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|