Avoid $` $& $' in libraries
[p5sagit/p5-mst-13.2.git] / lib / abbrev.pl
index c233d4a..62975e6 100644 (file)
@@ -17,7 +17,7 @@ sub main'abbrev {
        $len = 1;
        foreach $cmp (@cmp) {
            next if $cmp eq $name;
-           while (substr($cmp,0,$len) eq $abbrev) {
+           while (@extra && substr($cmp,0,$len) eq $abbrev) {
                $abbrev .= shift(@extra);
                ++$len;
            }