Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: chomp() is confusing

by TedPride (Priest)
on May 15, 2006 at 06:51 UTC ( #549386=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $/ = "\r\n";
    
  2. or download this
    for ("\r", "\n", "\r\n", "\n\r", "\r\r", "\n\n") {
        $line = 'text'.$_."text";
        $line =~ s/$1/\n/g if m/(\r\n?|\n\r?)/;
        print "$line\n";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-12-20 22:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (99 votes), past polls