- or download this
sub get_captures {
my ($pattern, $line) = @_;
...
shift(@captures) if !$#+;
return @captures;
}
- or download this
sub get_captures {
my ($pattern, $line) = @_;
my @captures = $line =~ m/$pattern/;
return @captures[0 .. $#+ - 1];
}
- or download this
sub get_captures {
my ($pattern, $line) = @_;
...
shift(@captures);
return @captures;
}
- or download this
sub get_captures {
my ($pattern, $line) = @_;
my @captures = $line =~ m/($pattern)/;
return @captures[1..$#captures];
}