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 :)
|
|---|