Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Yes just one loop and a %seen hash.
You put $var into %seen with $seen{$var}++ and whenever it's already set you'll know it needs to be checked. I'm not sure though how you want the first line to be handled, and you didn't provide test data.
Cheers Rolf In reply to Re: How to check lines that start with the same word then delete one of them
by LanX
|
|