5 ;# $long = $foo{$short};
8 # This library is no longer being maintained, and is included for backward
9 # compatibility with Perl 4 programs which may require it.
10 # This legacy library is deprecated and will be removed in a future
13 # In particular, this should not be used as an example of modern Perl
14 # programming techniques.
16 # Suggested alternative: Text::Abbrev
21 warn( "The 'abbrev.pl' legacy library is deprecated and will be"
22 . " removed in the next major release of perl. Please use the"
23 . " Text::Abbrev module instead." );
31 @extra = split(//,$name);
32 $abbrev = shift(@extra);
35 next if $cmp eq $name;
36 while (@extra && substr($cmp,0,$len) eq $abbrev) {
37 $abbrev .= shift(@extra);
41 $domain{$abbrev} = $name;
42 while ($#extra >= 0) {
43 $abbrev .= shift(@extra);
44 $domain{$abbrev} = $name;