in reply to Re: chomp() is confusing
in thread Why chomp() is not considering carriage-return
I am not sure whether you have tested this program in Windows or not
If you run your script on Windows, the carrage return and newline will both be removed (since it's expected that under Windows files will end in both a carriage return and a newline).
I tested this program in windows, which is not behaving in the way you have explained.
$one = "Hello\r\n";
print "Before chomp" , length($one) , "\n";
print "After Chomp" , length($one) , "\n";
From that I understood that only the newline is removed in chomp, not the carriage return.
Before chomp 7
After Chomp 6
"Keep pouring your ideas"