#!/usr/bin/perl use strict; open IN, "$infile1" or die $!; my $linecount = 0; my %hash; while (my $line = ) { chomp $line; $linecount+=1; $hash{$linecount} = $line; }