$nodeVal =~ s/^\s+|\s+$//g; #remove leading and trailing whitespace $nodeVal =~ tr/"//d; #remove quotation marks