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

You mean something like this?
use strict; use warnings; use Data::Dumper; my $str = '"$a $a $a" ab bc "c$d e$f$" c$d "$a $a $a"'; my @uniq = keys %{{map {$_ => 1}($str=~m/("[^"]*\$[^"]*")/g)}}; print Dumper(\@uniq);
And the output is -
$VAR1 = [ '"c$d e$f$"', '"$a $a $a"' ];
Note that I kept the regex simple by not trying to escape the string in the example above. If you want to include escaped strings, the regex becomes more complicated.
... my $str = '"$a $a $a" ab bc "c$d \"e$f$" c$d "$a $a $a"'; my @uniq = keys %{{map {$_ => 1} ($str=~m/("(?:\\"|.)*?\$(?:\\"|.)*?")/g)}}; ...
And the new output -
$VAR1 = [ '"c$d \\"e$f$"', '"$a $a $a"' ];