Help for this page

Select Code to Download


  1. or download this
    scrub 'pure', 'p!u-r-*e'; # returns pure
    
  2. or download this
    sub string_clean {
      my ($pure, $dirty) = @_;
    ...
      my @cleaned = grep { $pure{$_} } @dirty;
      return join '', @cleaned;
    }
    
  3. or download this
    scrub 'impure' => 'pure' ; # yields 'pure'