Regards#!/usr/bin/perl -w use strict; use Data::Dumper; my %hash; while (<DATA>) { chomp; my @row = split(':'); $hash{$row[2]}->{$row[1]} = 1; } print Dumper( \%hash ) . "\n"; __DATA__ D1:111:92111 D2:112:92111 D3:111:92111 D4:112:92111 D5:111:90222 D6:112:90222 D7:111:90222 D8:112:90222
In reply to Re: find unique values from a file by comparing two columns
by pme
in thread find unique values from a file by comparing two columns
by sreeragtk86
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |