diff options
Diffstat (limited to 'sbofind')
| -rwxr-xr-x | sbofind | 18 | 
1 files changed, 7 insertions, 11 deletions
@@ -6,7 +6,6 @@  # script to locate something in a local SlackBuilds tree.  #  # author: Jacob Pipkin <j@dawnrazor.net> -# date: Boomtime, the 39th day of Discord in the YOLD 3178  # license: WTFPL <http://sam.zoy.org/wtfpl/COPYING>  use 5.12.3; @@ -86,7 +85,7 @@ sub get_file_contents ($) {  	my $contents = do {local $/; <$fh>};  	for ($contents) {  		s/\n/\n        /g; -		s/        $//g; +		s/\n        $//g;  	}  	return $contents;  } @@ -97,17 +96,14 @@ my $findings = perform_search $search;  if (exists $$findings[0]) {  	my @listing = ("\n");  	for my $hash (@$findings) { -		while (my ($key, $value) = each %$hash) { -			push @listing, "SBo:    $key\n"; -			push @listing, "Path:   $value\n"; -			push @listing, "info:   ". get_file_contents "$value/$key.info" -				if $show_info; -			push @listing, "README: ". get_file_contents "$value/README" -				if $show_readme; -			push @listing, "\n"; +		while (my ($key, $val) = each %$hash) { +			say "SBo:    $key"; +			say "Path:   $val"; +			say "info:   ". get_file_contents "$val/$key.info"; +			say "README: ". get_file_contents "$val/README"; +			say '';  		}  	} -	print $_ for @listing;  } else {  	say "Nothing found for search term: $search";  }  | 
