Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Reconcile one list against another

by jaredor (Priest)
on May 05, 2011 at 06:52 UTC ( [id://903073]=note: print w/replies, xml ) Need Help??


in reply to Re: Reconcile one list against another
in thread Reconcile one list against another

Ditto! However, instead of comm, I tend to use uniq in a pipeline.

cat ${file1} ${file2} ${file2} | cut -d: -f1 | sort | uniq -u

(Slacking off and just doing the easier case for user id in the first field as opposed to the harder case of name extraction from the fifth field.)

Translating this to perl comes up with something like what's given in the following answers, but I find it's handy to test the rough idea on the command line if possible.

(EDIT: Removed the accidental dot between the paragraph and code tags. Moral: don't do markup after midnight.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://903073]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-06-17 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.