Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- ``use warnings;
- ``my (%hash,
- );
- while(my $line=<DATA>) {
- chomp $line;
- my ($letter, $object, $number)=split /,/, $line;
- $number+=0; # in case there is a whitespace at the end
- push @{$hash{$object}{$number}}, [$letter,$number,$line];
- }
- for my $object(sort keys %hash) {
- my $oref = $hash{$object};
- if (1==keys %$oref) {
- next;
- }
- my $str;
- for my $item (values %$oref) {
- $str .= $str ? " $item->[0][2]" : "$item->[0][2] is not matching with";
- }
- print ($str,"n");
- }
Add Comment
Please, Sign In to add comment