Help for this page

Select Code to Download


  1. or download this
    my $test_string="1b22a3d3c";
    
    ...
    push(@ordered, $1) while $test_string =~ /([abcd])/cg;
    
    pos($test_string) = 0; # reset m//cg offset
    
  2. or download this
    my %seen;
    my @order = grep { !$seen{$_}++ } $test_string =~ /([abcd])/g;