Help for this page

Select Code to Download


  1. or download this
    for (sort keys %histogram) {
      ...
    };
    
  2. or download this
    my %validchars = map { $_ => uc $_ } (qw( A B C D E F ... Z a b c d ..
    +. z ));
    # this sets
    ...
      my $target = $validchars{$_}; 
      $histogram{$target}++
    };
    
  3. or download this
    my %validchars;
    if ( $arg eq '-a' ) {
    ...
    } elsif ( $arg eq '-c' ) {
      %validchars = map { $_ => $_ } ( 'A' .. 'Z', 'a'..'z' );
    };