I think the problem is that you are misunderstanding how your program moves through your file. $_ only changes when the outer while loop completes.
Consider this code:
while ( <DATA> ) { chomp; until( /[^\d]/ ) { print "$_"; } } __DATA__ 1 A B C
This code will never terminate, it will just print '1' forever. The outer while block never completes and it never sees past the first line returned by the special DATA filehandle.
Try setting a flag to indicate what you should be looking for in your while loop. Use either an if-else chain or a dispatch table to handle each case.
TGI says moo
In reply to Re^3: Memory Problems with Parsing
by TGI
in thread Memory Problems with Parsing
by phantom20x
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |