Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
thanksopen (DUPLICATE, "datafiles/linked_file.txt"); open (DUPremoved, ">" . "datafiles/linked_file_dup.txt"); while (<DUPLICATE>) { chomp $_; #print $_; print DUPremoved if not $lines{$_}++; print DUPremoved "\n"; } close (DUPLICATE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: duplicate lines
by ivancho (Hermit) on Jun 02, 2005 at 09:28 UTC | |
|
Re: duplicate lines
by Tomtom (Scribe) on Jun 02, 2005 at 11:39 UTC | |
|
Re: duplicate lines
by japhy (Canon) on Jun 02, 2005 at 13:20 UTC | |
|
Re: duplicate lines
by terce (Friar) on Jun 02, 2005 at 09:31 UTC | |
|
Re: duplicate lines
by mikeraz (Friar) on Jun 02, 2005 at 11:17 UTC | |
by Tomtom (Scribe) on Jun 02, 2005 at 11:26 UTC | |
by mikeraz (Friar) on Jun 02, 2005 at 16:13 UTC |