This script deletes all duplicate paragraphs:
#! perl use strict; use warnings; my $string = do { $/ = undef; <DATA>; }; my @original = split /\n\n+/, $string; my @unique; OUTER: for my $orig (@original) { $orig eq $_ && next OUTER for @unique; push @unique, $orig; } print join("\n\n", @unique); __DATA__ 75160 etc.
Is that what you wanted? If not, you will need be more specific, and also show the desired output.
Hope that helps,
Update: ++hdb (when the Vote Fairy next visits) for the note on paragraph mode, below.
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: To remove duplicates inside a string
by Athanasius
in thread To remove duplicates inside a string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |