Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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?
[LanX]: On another node, I just saw yesterday that the everything engine supports auto-paragraph whithout the need to type <p>
LanX i.e. the newest everything engine
[holli]: nice. i never thought of hosting a script on the site
[LanX]: It's not a perfect solution, since it means invoking the monastery several times, but IMHO still better than hosting on another server
[holli]: i'm surprised it even executes. the server sends text/plain AND a content-dispositio n header
[holli]: this really really should not be executed as Javascript
erix's head is getting content indisposed

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2017-11-20 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (291 votes). Check out past polls.

    Notices?