open (FILE,"$tempfile5") || die "Cannot read from $tempfile5\n"; my %hsh; open (OUTF,">$tempfile6") || die "Cannot write to $tempfile6\n"; my @lines = ; undef @hsh{@lines}; my @lines2 = keys %hsh; foreach my $instance (@lines2) { print OUTF $instance; } close FILE; close OUTF;