in reply to How to remove a carriage return (\r\n)

look at $/ ( $INPUT_RECORD_SEPARATOR )
perl -MData::Dumper -e ' $key = "test text\r\n"; local $/ = "\r\n"; chomp $key; print Dumper $key;
Boris