# Save some typing when you can! Make your vars lexical where it makes sense. my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($tomorrows_time); # Get the last two digits. Much cleaner and faster $year = substr($year,-2,2); # I like to use a variable to turn on/off the debug code my $debug = 1; # somewhere near the top print "Testing: $important_currencies{$abbrev}" if $debug; # It's SO EASY to check for a zero in your divisor, so don't pass up the free ride! :) my $newrate; if (!$second_currency) { print "HEY! Don't divide! You'll puke!\n"; } else { $newrate = ($first_currency / $second_currency); }