in reply to find common data in multiple files

I searched MetaCPAN for "intersection set". The second entry (App::setop) appears to be exactly what you need.
Bill

Replies are listed 'Best First'.
Re^2: find common data in multiple files
by thanos1983 (Parson) on Dec 29, 2017 at 14:44 UTC

    Hello BillKSmith,

    I had no idea, great module thanks for pointing it also to us.

    Just to include a complete answer for future reference I will also add sample of code.

    #!/usr/bin/perl use strict; use warnings; use Capture::Tiny 'capture'; my $cmd = 'setop --intersect ' . join ' ', @ARGV; my ($stdout, $stderr, $exitCode) = capture { system( $cmd ); }; print $stdout if $exitCode == 0; print 'Error: ' . $stderr unless $exitCode == 0; __END__ $ perl test.pl File1.txt File2.txt File3.txt ID121 ABC14 ID122 EFG87 ID157 TSR11

    BR / Thanos

    Seeking for Perl wisdom...on the process of learning...not there...yet!