$str = "0.56HI There!"; $str += 10; # $str now is "10.56" #### sub bypre { substr($b,0,index($b,"+")) <=> substr($a,0,index($a,"+")); }