Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 exploiting the Monastery: (5)
As of 2014-10-26 08:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (152 votes), past polls