![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re: Improvement on script needed.by benn (Vicar) |
on Sep 08, 2003 at 13:01 UTC ( [id://289764]=note: print w/replies, xml ) | Need Help?? |
I'm not going to remove all the fun of coding from you, so here's a hint - you can do all this in a single loop...read, increment_keyhash,write (or not, as case may be). You can 'slurp' all in one go (as you do) and write to the same file, or read from one and write to another, then rename at the end.
Then again, you could simply use Tie::File and grep, but where's the fun in that? :) Cheers, Ben.
In Section
Seekers of Perl Wisdom
|
|