Help for this page

Select Code to Download


  1. or download this
    print "Insert your command:";
    
    $input = <STDIN>;
    ...
    elsif ($input eq "other command") {
      # do something else
    }
    
  2. or download this
    print "Insert your command:";
    
    $input = <STDIN>;
    ...
    elsif ($input =~ /^other command\s+(.*)/) {
      # do something else
    }
    
  3. or download this
    else {
      print "'$input' is not a valid command. Type help for a full list of
    + commands.\n";
    }