Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^5: Extracting full digits from a range

by jwkrahn (Monsignor)
on Aug 04, 2012 at 21:13 UTC ( #985463=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985463]
help
Chatterbox?
[Discipulus]: uch; everytime i want to read some source code i finally choke against an XS..

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2016-12-05 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (78 votes). Check out past polls.