Do you know where your variables are? | |
PerlMonks |
Re^3: file is replacedby colwellj (Monk) |
on Nov 30, 2009 at 22:49 UTC ( [id://810277]=note: print w/replies, xml ) | Need Help?? |
This is because you redefine $i in your sub and start from 0 each time. change; to; This will give you 0.xml and 6.xml. This is because you increment $i each time you write a tag. Move the $i++ to just after your open statement to count correctly.
In Section
Seekers of Perl Wisdom
|
|