Help for this page

Select Code to Download


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