Help for this page

Select Code to Download


  1. or download this
    sub chimpx {
        my $pat = @_ ? shift : $/; for @_ ? @_ : $_;
    }
    
  2. or download this
    chimpx $pat, my $dst = $src;
    
  3. or download this
    sub chimpx {
        my $pat = @_ ? shift : $/;
    ...
        s/^(?:\Q$pat\E)*// for @$targs;
        return wantarray ? @$targs : $targs->[0];
    }
    
  4. or download this
    use Test::More tests => 18;
    
    ...
        is($y1, 'ac',     'scalar multi args - 1st result verification');
        is($y2, 'ad',     'scalar multi args - 2nd result verification');
    }