Help for this page

Select Code to Download


  1. or download this
    sub trim {
      if (defined my $w = wantarray) {
    ...
        for (@_ ? @_ : $_) { s/^\s+//, s/\s+$// if $_ }
      }
    }
    
  2. or download this
    cmpthese( -1, {
            japhy => sub { $_ = '  asdf  '; trim1(); },
    ...
              Rate dchild  japhy
    dchild 39628/s     --    -3%
    japhy  40959/s     3%     --