Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: find common data in multiple files

by tybalt89 (Monsignor)
on Dec 28, 2017 at 14:34 UTC ( [id://1206325]=note: print w/replies, xml ) Need Help??


in reply to find common data in multiple files

#!/usr/bin/perl use strict; use warnings; my %all = map{$_, $_} do{local @ARGV = shift; <>}; %all = map{$_, $_} grep defined, @all{do{local @ARGV = $_; <>}} for @A +RGV; print sort keys %all;

Outputs:

ID121 ABC14 ID122 EFG87 ID157 TSR11

which looks right.

Hash slices can be your friend :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found