in reply to Re^4: how to check if a particular value exist in list of files stored in an array
in thread how to check if a particular value exist in list of files stored in an array
A few comments:
foreach my $file_name (@array) { open FILE, "$file_name" or die "File not exists"; while ( my $line = <FILE> ) { my ( $field1, $field2 ) = split /\,/, $line; if (exists $records{$field1}) { $field_2 = $records{$field1}; if( $field2 eq $field_2 ) { print OUTPUT $line; } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: how to check if a particular value exist in list of files stored in an array
by Perlseeker_1 (Acolyte) on Oct 30, 2013 at 08:54 UTC | |
by hdb (Monsignor) on Oct 30, 2013 at 08:59 UTC | |
by Perlseeker_1 (Acolyte) on Oct 30, 2013 at 11:04 UTC | |
by Corion (Patriarch) on Oct 30, 2013 at 11:12 UTC | |
by Perlseeker_1 (Acolyte) on Oct 30, 2013 at 17:28 UTC |