aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SBO-Lib/lib/SBO/Lib.pm9
-rwxr-xr-xsboconfig4
-rwxr-xr-xsbofind4
3 files changed, 5 insertions, 12 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
index 4b96117..389b6a7 100644
--- a/SBO-Lib/lib/SBO/Lib.pm
+++ b/SBO-Lib/lib/SBO/Lib.pm
@@ -61,9 +61,7 @@ if (-f $conf_file) {
}
# undef any invalid $key=$value pairs
for my $key (keys %config) {
- unless ($key ~~ @valid_conf_keys) {
- undef $config{$key};
- }
+ undef $config{$key} unless $key ~~ @valid_conf_keys;
}
# ensure we have sane configs, and defaults for anything not in the conf file
for my $key (@valid_conf_keys) {
@@ -320,9 +318,8 @@ sub get_sbo_downloads {
@md5s = find_download_info ($sbo, $location, 'md5sum', 0);
}
my @downloads;
- for my $key (keys @links) {
- push (@downloads, {link => $links[$key], md5sum => $md5s[$key]} );
- }
+ push (@downloads, {link => $links[$_], md5sum => $md5s[$_]} )
+ for keys @links;
return @downloads;
}
diff --git a/sboconfig b/sboconfig
index beaa719..63f1d51 100755
--- a/sboconfig
+++ b/sboconfig
@@ -50,9 +50,7 @@ show_version () and exit (0) if exists $options{v};
if (exists $options{l}) {
my @keys = sort {$a cmp $b} keys %config;
- for my $key (@keys) {
- print "$key=$config{$key}\n";
- }
+ print "$_=$config{$_}\n" for @keys;
exit 0;
}
diff --git a/sbofind b/sbofind
index e32d940..3bae022 100755
--- a/sbofind
+++ b/sbofind
@@ -96,9 +96,7 @@ if (exists $findings[0]) {
push (@listing, "\n");
}
}
- for my $list (@listing) {
- print $list;
- }
+ print $_ for @listing;
} else {
print "Nothing found for search term: $search\n";
}