http://www.perlmonks.org?node_id=985463


in reply to Re^4: Extracting full digits from a range
in thread Extracting full digits from a range

you can't chomp a filehandle

While that may be true, the example provided was trying to chomp the readline function:

$ perl -le'my $x = chomp( <STDIN> )' Can't modify <HANDLE> in chomp at -e line 1, at end of line Execution of -e aborted due to compilation errors. $ perl -le'my $x = chomp( readline STDIN )' Can't modify <HANDLE> in chomp at -e line 1, at end of line Execution of -e aborted due to compilation errors.
(assuming there's a newline at the end of the target line)

Also, assuming that readline was called in scalar context and not list context.