$str="6 1/2"; # actually it comes from a file of tokenized strings $str=~s/_/-/;