#!/bin/perl -w # works out how much VAT you've paid on a given amount # Change the amount on the next line for the required VAT rate $vat = 17.5; print "Please enter an amount paid including the VAT "; $amount = ; $Vat = ( $amount - ($amount * 100 / (100 + $vat))); printf("You paid %.2f VAT\n", $Vat);