$weekly = int(($yearlyamount/52)*100); $weekly = s,\d{2}$,\.$&,; printf ("%5.2f", $weekly);