Help for this page

Select Code to Download


  1. or download this
    HELP_MESSAGE() and exit unless $ARGV[1];
    
    foreach (@ARGV) {
      HELP_MESSAGE() and exit unless /^-?\d+$/
    }
    
  2. or download this
    use File::Basename;
    # [unrelated code]
    ...
    # Validity checking
    ($x =~ /^-?\d+$/) or die "$iam:  value $x not an integer\n";
    ($y =~ /^-?\d+$/) or die "$iam:  value $y not an integer\n";
    
  3. or download this
    HELP_MESSAGE() and exit unless $ARGV[1];
    
    ...
    
    my $start = shift @ARGV;
    my $end = shift @ARGV;