in reply to Re^3: Find duplicate lines from the file and write it into new file.
in thread Find duplicate lines from the file and write it into new file.

Pretty easy, the numbers are stored in the hash already. Just remove the print and add the following at the end of the script:
print "$duplicates{$_}\t$_" for grep $duplicates{$_} > 1,keys %duplica +tes;
  • Comment on Re^4: Find duplicate lines from the file and write it into new file.
  • Download Code