I had a similar problem when I just started out with Perl. However, with time it became a habit of mine to chomp input prior to its consumption ;). There's certainly a lot of other Perl 'traps' to worry about besides this one. What immediately springs to my mind is the
perltrap page. This is certainly a good read for both novice and intermediate Perl programmers.
Generally, however, doing things right in Perl becomes almost a second nature with time. Some basic examples are using strict, doing sanity checks, defensive programming to name a few. The more you develop Perl and concentrate on the quality of your end product/script, the more 'intuitive' these tasks become.
_____________________
# Under Construction