[tpm] chomp problem

Omid Gulban omid.gulban at sickkids.ca
Fri Feb 4 12:23:48 PST 2011


Hello All,

I have a simple script shown below:
on windows xp platform.



use warnings;
use strict;

while (<DATA>) {
        chomp $_;
        print "$_";
}

__END__
a
b
c
d
e
f
g
h


Why do I get an output that looks like this:
a
ab
bc
cd
de
ef
fg
ghh

I expected to see:
abcdefg


Thanks
Omid

This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.


More information about the toronto-pm mailing list