diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-09-19 17:31:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-09-19 17:31:42 +0000 |
commit | 25f65beed0677fa247c513705dbf538225f979c4 (patch) | |
tree | e0ec937937cba2d6279e97b3b7036fe0856d5bb2 /perl-install/common.pm | |
parent | a0b5f74447cc699c43c354cb6397ed554605729b (diff) | |
download | drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.gz drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.bz2 drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.xz drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.zip |
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index 199f2320a..41ddbf98e 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -18,10 +18,10 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int #-##################################################################################### #- Globals #-##################################################################################### -$printable_chars = "\x20-\x7E"; -$sizeof_int = psizeof("i"); -$bitof_int = $sizeof_int * 8; -$SECTORSIZE = 512; +$printable_chars = "\x20-\x7E"; +$sizeof_int = psizeof("i"); +$bitof_int = $sizeof_int * 8; +$SECTORSIZE = 512; #-##################################################################################### #- Functions @@ -230,7 +230,7 @@ sub warp_text($;$) { my ($text, $width) = @_; $width ||= 80; - my @l; + my @l; foreach (split "\n", $text) { my $t = ''; foreach (split /\s+/, $_) { @@ -251,7 +251,7 @@ sub getVarsFromSh($) { local *F; open F, $_[0] or return; foreach (<F>) { - my ($v, $val, $val2) = + my ($v, $val, $val2) = /^\s* # leading space (\w+) = # variable ( @@ -280,7 +280,7 @@ sub best_match { my ($str, @lis) = @_; my @words = split /\W+/, $str; my ($max, $res) = 0; - + foreach (@lis) { my $count = 0; foreach my $i (@words) { @@ -298,7 +298,7 @@ sub bestMatchSentence { my @s = split /\W+/, shift; foreach (@_) { my $count = 0; - foreach my $e (@s) { + foreach my $e (@s) { $count++ if /$e/i; } $best = $count, $bestSentence = $_ if $count > $best; @@ -314,7 +314,7 @@ sub bestMatchSentence2 { my @s = split /\W+/, shift; foreach (@_) { my $count = 0; - foreach my $e (@s) { + foreach my $e (@s) { $count+= length ($e) if /$e/i; } $best = $count, $bestSentence = $_ if $count > $best; @@ -326,4 +326,4 @@ sub bestMatchSentence2 { #-###################################################################################### #- Wonderful perl :( #-###################################################################################### -1; # +1; # |