http://www.perlmonks.org?node_id=1041433


in reply to Re: To remove duplicates inside a string
in thread To remove duplicates inside a string

One remark: setting $/="" (paragraph mode) avoids the two step reading of the file:

my @original = do { $/ = ""; <DATA>; };