- or download this
#!/usr/bin/perl -w
...
print "\n";
my $now = localtime time;
print "Current Date and Time: $now\n";
- or download this
print "Would you like to add another item? - Y or N\n";
chomp ($continue = <STDIN>);
- or download this
$continue = some invalid value;
while ($continue is not a valid value) {
print out the prompt;
chomp ($continue = <STDIN>); # unchanged.
}