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 reply to Re^3: Why does default $_ only work
by haukex
in thread Why does default $_ only work
by catfish1116
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |