commit c0f9ff8ef0306784146733eb6f09012709e6e4df
parent c5b966ea7ec1cc6b7a502ed750701daf9c35872b
Author: Jacob Pipkin <d4wnr4z0r@yahoo.com>
Date: Wed, 23 May 2012 18:13:00 -0500
cleanup
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git 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();