Help for this page

Select Code to Download


  1. or download this
    use Text::Abbrev;
    use strict;
    ...
    else {
      print "$action was ambiguous.\n";
    }
    
  2. or download this
    if ("hsbn" =~ /^$action/) {
      # $action is "h", "hs", "hsb", or "hsbn"
    }
    
  3. or download this
    my $valid = join "\n", qw( hsbn admin help quit ... );
    chomp(my $action = <STDIN>);
    ...
    else {
      print "You selected $matches[0].\n";
    }