sub str2num{ return hash($str); } $str='smpl95'; $num=str2num($str);