Others have pointed out how to do the I/O and regexp more efficiently. I'm going to stick with the structure:
DATA is a horrible name to use a file handle because perl provides a semi-magic one with the same name. When I glanced and saw that, I immediately looked for a __DATA__ marker.
I don't like big "if" blocks with no else. I think something like next unless ( $line =~ m/..../ ); is easier to read.
Also, the formatting could be better. Four closing bracers on the same line make me think of the worst abuses in LISP.
- doug
In reply to Re: quicker way to merge files?
by doug
in thread quicker way to merge files?
by nessundorma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |