Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: chomp() is confusing

by ikegami (Pope)
on May 23, 2006 at 16:52 UTC ( #551204=note: print w/ replies, xml ) Need Help??


in reply to Re^2: chomp() is confusing
in thread Why chomp() is not considering carriage-return

If you want to chomp \r\n, set $/ to \r\n:

local $/ = "\r\n"; $one = "Hello\r\n"; print "Before chomp: " , length($one) , "\n"; chomp($one); print "After Chomp: " , length($one) , "\n";


Comment on Re^3: chomp() is confusing
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2014-09-02 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (29 votes), past polls