sub chimpx { my $pat = @_ ? shift : $/; my $targs = sub { \@_ }->( @_ ? @_ : $_ ); @$targs = @$targs if defined(wantarray); s/^(?:\Q$pat\E)*// for @$targs; return wantarray ? @$targs : $targs->[0]; }