Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a 3-argument version of 'split'.

  • Loading branch information...
commit 5a00418d55fb3341a8b3ea37fa965ef177b77949 1 parent f4b1cd6
Angel Ortega authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 Art5.pm
5 Art5.pm
View
@@ -491,6 +491,11 @@ sub init {
$self->{op}->{size} = sub { return scalar @{$self->exec($_[0])} };
$self->{op}->{split} = sub {
+ if (scalar(@_) == 3) {
+ return [ map { [ split($self->exec($_[1]), $_) ] }
+ split($self->exec($_[0]), $self->exec($_[2]))
+ ];
+ }
return [ split($self->exec($_[0]), $self->exec($_[1])) ];
};
Please sign in to comment.
Something went wrong with that request. Please try again.