XP is just a number | |
PerlMonks |
How to extract lines starting with new names/wordsby sm2004 (Acolyte) |
on Mar 13, 2008 at 07:31 UTC ( [id://673918]=perlquestion: print w/replies, xml ) | Need Help?? |
sm2004 has asked for the wisdom of the Perl Monks concerning the following question:
I have a text file that looks like: MA01001A1A03.f1 760 5640111 ad1 MA01001A1A03.f1 760 42572233 ubq MA01001A1A04.f1 300 15232924 ubq MA01001A1A04.f1 300 145334669 DNA MA01001A1B22.f1 580 77745475 ra MA01001A1B22.f1 580 30409730 ra How do I write a perl script to extract the lines based on the first word being new in the list? So the extracted list should have only: MA01001A1A03.f1 760 5640111 ad1 MA01001A1A04.f1 300 15232924 ubq MA01001A1B22.f1 580 77745475 ra Any tips on how to get this done is appreciated very much.
Back to
Seekers of Perl Wisdom
|
|