Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: Why does default $_ only workby haukex (Archbishop) |
on Aug 10, 2020 at 19:43 UTC ( [id://11120558]=note: print w/replies, xml ) | Need Help?? |
I do not believe chomp is taking the LHS of the assignment and working with it that scalar. No, that's incorrect, chomp does modify its argument and the return value of the assignment my $selection = <STDIN> is the lvalue $selection, which chomp operates on. The use of chomp in this code is correct and has nothing to do with the problem, it's a = vs =~ problem.
In Section
Seekers of Perl Wisdom
|
|