The $. variable contains the line number last read from the last filehandle access. So you can simply store the value each time you start a new array and add the starting line number to your table of information. You can read more about the $. variable at perlvar.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^3: Parsing .txt into arrays
by roboticus
in thread Parsing .txt into arrays
by Fshah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |