... rather than slurping the whole file.
But won't the while ( <$inFH> ) { ... } loop end up reading the entire file into the @groups array (actually an array-of-arrays or AoA) before it finishes? This is not what I think of when I think of "line-by-line" processing of a file. (Actually, it looks a lot like slurping! :)
Give a man a fish: <%-{-{-{-<
In reply to Re^2: How to reorder a text file
by AnomalousMonk
in thread How to reorder a text file
by hennesse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |