in reply to Re: Why does default $_ only work
in thread Why does default $_ only work

try

if ( $selection  =~  /(.)\1/ )

see also

perlop#Binding-Operators

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