in reply to removing same entries between 2 files
This is assuming that 'file 2' is tab separated, the layout of the file is as explained, and that I do not know the names or locations of the files.#!/usr/bin/perl use strict; use warnings; open FILE_1, 'file.1' || die 'ERROR:\t$!\n"; open FILE_2, 'file.2' || die 'ERROR:\t$!\n"; while ( my $line = <FILE_2> ) { my ( $filename, $accounts, @nonrelevant ) = split( /\t/, $line ); next if ( $accounts exists( @{[<FILE>]} ) ); print "$accounts:\t$filename\n"; } close FILE_1; close FILE_2;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: removing same entries between 2 files
by wfsp (Abbot) on Nov 26, 2005 at 19:15 UTC | |
by wazzuteke (Hermit) on Nov 28, 2005 at 02:55 UTC | |
by sbp (Initiate) on Nov 30, 2005 at 03:12 UTC | |
by BrowserUk (Patriarch) on Nov 30, 2005 at 03:45 UTC |