From: Simon Ruderich Date: Wed, 14 Aug 2013 13:17:08 +0000 (+0200) Subject: Simplify compile_flag_regexp(). X-Git-Tag: 0.05~25 X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=commitdiff_plain;h=cb96ed22d2d46c34a1a06fea374eeb0c6cf0269b;ds=sidebyside Simplify compile_flag_regexp(). --- diff --git a/bin/blhc b/bin/blhc index cfe49d2..3abb979 100755 --- a/bin/blhc +++ b/bin/blhc @@ -517,14 +517,12 @@ sub compile_flag_regexp { sub extension_found { my ($extensions_ref, @extensions) = @_; - my $found = 0; foreach my $extension (@extensions) { if (exists $extensions_ref->{$extension}) { - $found = 1; - last; + return 1; } } - return $found; + return 0; }