Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 pondering the Monastery: (3)
As of 2014-09-18 02:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (104 votes), past polls