#!/usr/bin/perl use Math::Round qw(:all); print "Minutes?\n"; $minutes = <>; chop $minutes; $timeleft = 60*$minutes; system("clear"); while($timeleft >= 0){ $devided = $timeleft/60; $rounded = nlowmult (1, $devided); $seconds = $timeleft-($rounded*60); print "$rounded minutes and to $seconds seconds left\n"; $ran = 30/$timeleft; $count = $ran*$timeleft; while ($count >=0 ){ print "#"; $count--; } sleep (1); system("clear"); $timeleft--; } print "TIME UP!!!!!!\a"; while (1){ print "\a"; print "\a"; }