in reply to Re^2: Idiomatic Perl?
in thread Idiomatic Perl?

Try it! What does it return?

If it's not what you want, another approach might be to call the chomp on the result of the assignment:

chomp( my $str = <STDIN> );

Hope this helps!


The way forward always starts with a minimal test.