Perl: the Markov chain saw | |
PerlMonks |
Re^3: Deleting duplicate lines from fileby blazar (Canon) |
on Feb 17, 2006 at 09:59 UTC ( [id://530899]=note: print w/replies, xml ) | Need Help?? |
Yes, it is likely to be of some use. That's precisely what you need. In English it parses like thus:
Anything else? So this seems to be exactly what you need. Except that your description suggests you don't really want to operate on lists and you don't need to assign to arrays. Thus all in all you could do something along the lines of:
which can be compacted/golfed as in my other reply. UPDATE: speaking toungue-in-cheek - but previous experience tells me won't listen anyway: evidence is that your Perl knowledge is quite limited. So far so fine, nobody can impose to you to be an expert or to become one in a minute. But it is just as evident that you're routinely using perl to get some job done. In this case it should be recommendable to get acquainted with Perl's basic syntax, semantics, idioms. That is: asking here for help is fine and all the rest, but I guarantee to you that spending some time to read some introductory book or tutorial will enable you to solve problems like this and to understand code like the above, since I assure you that there's nothing particularly advanced or complex involved.
In Section
Seekers of Perl Wisdom
|
|