in reply to Perl using $seen with regex

$ perl -ae 'print if $seen{/$_(\h\.)?}++' story.rst

this code doesn't compile or even run

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery