Thats sounds like a damn good analysis to me.
Each time the line in question is accessed, @ary is redeclared (blank). This even happens when the line is executed just for <DATA> to return false. So the last iteration redeclares @ary, there's no more DATA and the program moves on.
I really have to get the debugger frame of mind happening, I almost never use it, preferring copious print statements and the like, but as you have done here it can work wonders.
You might not consider yourself to be god/wizard level but I think this ones worth a bunch of votes. Good play sir!
Yves
--
You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)
In reply to Monks, I think we have a winner!
by demerphq
in thread Getting data out of __DATA__ and __END__
by George_Sherston
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |