[tpm] chomp problem

Matt Sergeant matt at sergeant.org
Fri Feb 4 14:14:50 PST 2011

Mark Fowle wrote:
> line ends in windows tend to be \r\n.
> comp safely removes one line end character, as aposed to chop that 
> removed one cjharacter from the end of a line.
> so chomp$_; chomp $_; is safe and will work on any computer OS.
Right, but it won't do what the user wants, because chomp just removes 
whatever is in $/ which defaults to "\n".

It's strongly recommended to read the perlport man page if you have to 
use windows.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20110204/b9290004/attachment.html>

More information about the toronto-pm mailing list