$string =~ s/^"(.*)"$/$1/; # or (faster if you always have quotes): $string = substr($string, 1, length($string)-2);