If chomp won't do it try:
$key =~ s/\r\n//;
Phil
Update: Explained why chomp usually removes your platform default line ending.
In reply to Re: How to remove a carriage return (\r\n)
by philcrow
in thread How to remove a carriage return (\r\n)
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |