diff options
author | Jacob Pipkin <d4wnr4z0r@yahoo.com> | 2012-05-23 18:13:00 -0500 |
---|---|---|
committer | Jacob Pipkin <d4wnr4z0r@yahoo.com> | 2012-05-23 18:13:00 -0500 |
commit | c0f9ff8ef0306784146733eb6f09012709e6e4df (patch) | |
tree | e7a63c5302fa686a445474189e60e5dd0e80d547 | |
parent | c5b966ea7ec1cc6b7a502ed750701daf9c35872b (diff) | |
download | sbotools2-c0f9ff8ef0306784146733eb6f09012709e6e4df.tar.xz |
cleanup
-rwxr-xr-x | sbofind | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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(); |