aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsbofind16
1 files changed, 8 insertions, 8 deletions
diff --git a/sbofind b/sbofind
index a1bb492..fa6fd65 100755
--- a/sbofind
+++ b/sbofind
@@ -32,7 +32,7 @@ EOF
}
my %options;
-getopts ('hv',\%options);
+getopts ('hv', \%options);
show_usage () and exit (0) if (exists $options{h});
show_version () and exit (0) if (exists $options{v});
@@ -42,7 +42,7 @@ my $search = $ARGV[0];
slackbuilds_or_fetch ();
-my (@findings,$name);
+my (@findings, $name);
my $found = 'FALSE';
my $regex = qr/NAME:\s.*\Q$search\E.*/;
open my $sb_txt, '<', "$config{SBO_HOME}/SLACKBUILDS.TXT";
@@ -50,18 +50,18 @@ FIRST: while (my $line = <$sb_txt>) {
unless ($found eq 'TRUE') {
if ($line =~ $regex) {
$found = 'TRUE';
- my @split = split (' ',$line);
+ my @split = split (' ', $line);
chomp ($name = $split[2]);
next FIRST;
}
} else {
if ($line =~ /LOCATION/) {
$found = 'FALSE';
- my @split = split (' ',$line);
+ my @split = split (' ', $line);
chomp (my $location = $split[2]);
$location =~ s#^\.##;
my %hash = ($name => $config{SBO_HOME} . $location);
- push (@findings,\%hash);
+ push (@findings, \%hash);
}
}
}
@@ -69,9 +69,9 @@ FIRST: while (my $line = <$sb_txt>) {
if (exists $findings[0]) {
my @listing;
for my $hash (@findings) {
- while (my ($key,$value) = each %{$hash}) {
- push (@listing,"SBo: $key\n");
- push (@listing,"Path: $value\n\n");
+ while (my ($key, $value) = each %{$hash}) {
+ push (@listing, "SBo: $key\n");
+ push (@listing, "Path: $value\n\n");
}
}
my $tab = new Text::Tabulate();