Help for this page

Select Code to Download


  1. or download this
    my $chars = q{abcde};           # Specify the characters.
    my $matchset = "[$chars]";      # Set up a character class.
    ...
    __END__
    apple
    elmo
    
  2. or download this
    
    my $matchset = "[^$chars]"; # <-- Changed to a negated char class.
    ...
    foreach my $string ( @strings ) {
        print "$_ is pure" if not $string =~ $reg_match; # Disqualify stri
    +ngs with illegal chars.
    }
    
  3. or download this
    package Multiset;
    
    ...
    my @found = $multi->list_seen();
    print "Entries:\n\t@found\n";
    
  4. or download this
    ab
        is valid.
    ...
        is not unique.
    Entries:
        ab cd abc bb ac