http://www.perlmonks.org?node_id=1031312

tty1x has asked for the wisdom of the Perl Monks concerning the following question:

#!/usr/bin/perl w print "Please enter your name\n"; chomp($name = <STDIN>); print "Thank you $name";
The output I expected after entering 'aaa' as input :
Please enter your name aaaThank you aaa[root Shared]#
but the output came up to be :
Please enter your name aaa Thank you aaa[root Shared]#
I assumed Chomp has already removed the /n character for STDIN, why has the next print still print on a new line ?