in reply to Re^2: Why does default $_ only work
in thread Why does default $_ only work
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Why does default $_ only work
by perlfan (Parson) on Aug 10, 2020 at 19:48 UTC |