kborz has asked for the wisdom of the Perl Monks concerning the following question:
Yes, use chomp($i);.
In practice:
while (defined(my $i = <STDIN>)) { chomp($i); print("[$i]\n"); } [download]
while (<STDIN>) { chomp; print("[$_]\n"); } [download]