Help for this page

Select Code to Download


  1. or download this
    my @list= qw(a b c a c);
    my $w="kandabbbc";
    ...
       @list = grep {!/\Q$a/} @list;
    }
    print $w;
    
  2. or download this
    my %saw;
    for (@list) {
        next if $saw{$_}++;
        # ...
    }
    
  3. or download this
    my @list= qw(a b c a c);
    my $re = join '|', @list;
    
  4. or download this
    my $re=join "", @list;
    $re="[$re]";