#!/usr/bin/perl -w use strict; my $ammount; my $value; my $response = qq{Value should be 189.81 (rounded to two decimals)} . qq{ and sprintf gives us: %.02f \n}; $ammount = 159.5; $value = $ammount * 1.19; print sprintf($response, $value); $ammount = 159.5; $value = ($ammount*119)/100; print sprintf($response, $value);