in reply to Re: Re: parse for string, then print unique
in thread parse for string, then print unique

If the quotes are part of the string, what else would you allow to be part of the string? Is more than one $ ok? Based on the ^ in your original try, is what you really want entire lines of the file? If so, what lines don't you want?

I note that your original posting kept the strings in original order (by filtering out duplicates assuming they were in sorted order). If that is what you want, any of the solutions involving keys aren't going to do what you want. A hash approach will still work, but goes like this:

my %seen; @out = map !$seen{$_}++, @in;
or just keep your original grep (unless the strings aren't in sorted order).