Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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.


Comment on Re^5: Extracting full digits from a range
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985463]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2015-07-04 22:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls