print if /...(...).../ && $seen{$1}++;
(The pattern you had made no sense.)
The above prints the duplicates. Don't forget to negate if you are trying to remove duplicates.
print if /...(...).../ && !$seen{$1}++;
In reply to Re: Perl using $seen with regex
by ikegami
in thread Perl using $seen with regex
by abdan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |