Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi ,
I have a file which have input as like below
pet="cat"|hate="rat"|like="dog" hate="rat"|like="dog"|pet="cat" hate="rat"|like="horse"|pet="cat" pet="cow"|hate="rat"|like="dog" hate="rat"|like="dog"|pet="cow"
And output im looking is
pet="cat"|hate="rat"|like="dog" pet="cow"|hate="rat"|like="dog"
Any first instance where I find unique value for pet and hate I wanted to print.
Thanks
2018-05-16 Athanasius added code and paragraph tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: make a search pattern and remove duplicate from the file
by jimpudar (Pilgrim) on May 11, 2018 at 04:24 UTC | |
|
Re: make a search pattern and remove duplicate from the file
by NetWallah (Canon) on May 11, 2018 at 06:36 UTC | |
by jimpudar (Pilgrim) on May 11, 2018 at 16:15 UTC | |
by NetWallah (Canon) on May 11, 2018 at 20:15 UTC | |
by jimpudar (Pilgrim) on May 12, 2018 at 15:30 UTC |