X-Git-Url: http://git.shiar.net/perl/list-index.git/blobdiff_plain/5d1c609f28d64e60c9595c9a207b8d19e823b122..d6c30ef4ef400982bc1b08e9b7bf93993ea29be5:/lib/List/Index.pm diff --git a/lib/List/Index.pm b/lib/List/Index.pm index 23ab261..c42db44 100644 --- a/lib/List/Index.pm +++ b/lib/List/Index.pm @@ -59,6 +59,10 @@ sub rangematch { my @allow; if (length $s1) { + if (length $s2) { + $s1 le $s2 or $s1 =~ /^\Q$s2/ or return undef; + } + my $prefix = ''; my $char; for my $i (0 .. length($s1) - 1) {