Something like<br><br>my $line = $_;<br>$line =~ s/(?:\r\n|\n)$//;<br>print $line;<br><br>.. should also work.<br><br><div class="gmail_quote">On Fri, Feb 4, 2011 at 3:56 PM, Mark Fowle <span dir="ltr">&lt;<a href="mailto:mfowle@navicominc.com">mfowle@navicominc.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div>
<div dir="ltr" align="left"><span><font face="Arial" size="2" color="#0000ff">line ends in windows tend to be \r\n.</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" size="2" color="#0000ff">comp safely removes one line end character, as aposed to chop 
that removed one cjharacter from the end of a line.</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" size="2" color="#0000ff">so chomp$_; chomp $_; is safe and will work on any computer 
OS.</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" size="2" color="#0000ff"></font></span> </div>
<div><font face="Arial" size="2" color="#0000ff"></font> </div>
<div><font face="Arial" size="2" color="#0000ff"></font> </div>
<div><br></div>
<div dir="ltr" lang="en-us" align="left">
<hr>
<font face="Tahoma" size="2"><b>From:</b> 
toronto-pm-bounces+mfowle=<a href="http://navicominc.com" target="_blank">navicominc.com</a>@<a href="http://pm.org" target="_blank">pm.org</a> 
[mailto:<a href="mailto:toronto-pm-bounces%2Bmfowle" target="_blank">toronto-pm-bounces+mfowle</a>=<a href="http://navicominc.com" target="_blank">navicominc.com</a>@<a href="http://pm.org" target="_blank">pm.org</a>] <b>On Behalf Of 
</b>Omid Gulban<br><b>Sent:</b> Friday, February 04, 2011 3:42 PM<br><b>To:</b> 
<a href="mailto:tpm@to.pm.org" target="_blank">tpm@to.pm.org</a><br><b>Subject:</b> [tpm] chomp problem<br></font><br></div><div><div></div><div class="h5">
<div></div>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div><font size="+0"><font size="2">Hello All,<br><br>I have a simple script shown 
below:<br>on windows xp platform.<br><br><br><br>use warnings;<br>use 
strict;<br><br>while (&lt;DATA&gt;) 
{<br>        chomp 
$_;<br>        print 
&quot;$_&quot;;<br>}<br><br>__END__<br>a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br><br><br>Why 
do I get an output that looks like 
this:<br>a<br>ab<br>bc<br>cd<br>de<br>ef<br>fg<br>ghh<br><br>I expected to 
see:<br>abcdefg<br><br><br>Thanks<br>O<br></font></font></div></div><br></div></div></div>
<br>_______________________________________________<br>
toronto-pm mailing list<br>
<a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
<br></blockquote></div><br>