NYCPHP Meetup

NYPHP.org

[nycphp-talk] What does this code do?

-- rada -- radalapsker at yahoo.com
Mon Mar 3 13:12:54 EST 2008


Hi all,

I am trying to implement a user-input scrubbing function, more specifically, normalize linebreaks from windows/mac to unix. I can just do preg_replace but I saw this piece of code somewhere and don't understand it enough to even know what to google. 

supposedly converts Windows CRLF  to Unix LF:
$str =~ s/\r\n/\n/g;

What does =~ do? I can RTFM if you point me to it :)





      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080303/fe45951a/attachment.html>


More information about the talk mailing list