diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-03-14 13:23:58 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-03-14 13:23:58 +0000 |
commit | ca65ae10ac5443fdb9fea25f8d53ea703554a8f8 (patch) | |
tree | 1a0a73f24bdd54fd615cdaba6b27fa8bee01f4ad /perl-install/common.pm | |
parent | cee6a6a9b58ceff623628c7e0955016fa3d5f001 (diff) | |
download | drakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.tar drakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.tar.gz drakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.tar.bz2 drakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.tar.xz drakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.zip |
(bestMatchSentence, bestMatchSentence2): in wantarray, return the number
of matched words/characters
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index 9fa9e620a..d680311b7 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -547,7 +547,7 @@ sub bestMatchSentence { } $best = $count, $bestSentence = $_ if $count > $best; } - $bestSentence; + wantarray ? ($bestSentence, $best) : $bestSentence; } # count the number of character that match @@ -563,7 +563,7 @@ sub bestMatchSentence2 { } $best = $count, $bestSentence = $_ if $count > $best; } - $bestSentence; + wantarray ? ($bestSentence, $best) : $bestSentence; } sub typeFromMagic($@) { |