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


in reply to "chomp" not working

as always in such a case, I'd recommend to look what you really have in your variable. with a normal print you only see printable characters.
use Data::Dumper; local $Data::Dumper::Useqq = 1; # will also print \r, \n etc. print Dumprt $var;
from HTML forms you typically get a carriage return and a newline.