#!/bin/perl -w use strict; my $days = 0; while ("$days" ne "q") { print "Please enter a single positive integer that represents a number of days" . , " that you wish to convert into seconds. ,(enter q to quit): "; $days=; chomp $days; if ($days > 0) { my $seconds = $days * 86400; my $plural = ($days ==1) ? '': 's'; print "\n[$days] day$plural = [$seconds] seconds.\n\n"; } elsif ($days < 0) { print "!!! Invalid input. Value must be a positive integer."; } elsif ("$days" eq "") { print "!!! You must enter a positive integer.\n\n"; } } print "Goodbye\!\n\n";