in reply to Why does default $_ only work
Code that doesnt work:
print "Enter a string that will match the secret matching pattern \ +n"; chomp (my $selection = <STDIN>); if ($selection = (/(.)\1/)) { print "The match was perfect \n"; } else { print "Match not found \n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Why does default $_ only work
by BillKSmith (Monsignor) on Aug 10, 2020 at 19:41 UTC | |
Re^2: Why does default $_ only work
by LanX (Saint) on Aug 10, 2020 at 19:39 UTC | |
Re^2: Why does default $_ only work
by perlfan (Parson) on Aug 10, 2020 at 19:38 UTC | |
by haukex (Archbishop) on Aug 10, 2020 at 19:43 UTC | |
by perlfan (Parson) on Aug 10, 2020 at 19:48 UTC |