From: Simon Ruderich Date: Tue, 20 Mar 2012 19:26:06 +0000 (+0100) Subject: \s includes \n, no need for $ in a few regexps. X-Git-Tag: 0.01~86 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=ac520d864fb61ea87c938921440d151d88214719;p=blhc%2Fblhc.git \s includes \n, no need for $ in a few regexps. --- diff --git a/bin/blhc b/bin/blhc index 2c439bb..5f37c79 100755 --- a/bin/blhc +++ b/bin/blhc @@ -119,7 +119,7 @@ sub any_flags_used { my ($line, @flags) = @_; foreach my $flag (@flags) { - return 1 if $line =~ /\s$flag(?:\s|\\|$)/; + return 1 if $line =~ /\s$flag(?:\s|\\)/; } return 0; @@ -129,7 +129,7 @@ sub all_flags_used { my @missing_flags = (); foreach my $flag (@flags) { - if ($line !~ /\s$flag(?:\s|\\|$)/) { + if ($line !~ /\s$flag(?:\s|\\)/) { push @missing_flags, $flag; } }