#!/usr/local/bin/perl -w $input = ''; #temporary input $hrate = 0; #pay rate $yrate = 0; #yearly salary while () { print 'Do you wish to calculate yearly salary (y) or hourly rate?(h)'; chomp ($input = ); if ($input eq '') { last; } if ($input =~ /h/) { print "Enter your hourly rate:"; chomp ($hrate = ); $yrate = ($hrate * 40) *52; } }print "Your yearly salary is $yrate";