I wrote a very simple script but dont understand why chomp($_ = <STDIN>) works and chomp(my $selection = <STDIN>) doesnt. Below is code written with chomp set to default.
print "Enter a string that will match the secret matching pattern \n" +; chomp ($_ = <STDIN>); if ($_ = (/(.)\1/)) { print "The match was perfect \n"; } else { print
TIA The Catfish
In reply to Why does default $_ only work by catfish1116
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |