Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Stupid mistakes I repeatedly make

by Ven'Tatsu (Deacon)
on Mar 28, 2005 at 17:07 UTC ( [id://442869]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Stupid mistakes I repeatedly make
in thread Stupid mistakes I repeatedly make

I've use this in my code before:
#actual data came over the network with inconstant line ends. my $text = "some\r\nmulti-line\ntext"; my $line_count = $text =~ s/\r?\n/\n/g;
There were cenrtanly a dozen other ways to get the line count, but for what was being done this was the most strait forward, without doing double work.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2025-07-15 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.