#!/usr/bin/perl -w open( IN, "$infile1" ) or die "Can't open $infile1" $linecount = 0; %hash = 0; while ( my $line = ) { $linecount = $linecount + 1; push( @{ $hash{$line} }, $linecount ); }