Skip to content

Commit

Permalink
nl: Need to match against the right variable
Browse files Browse the repository at this point in the history
  • Loading branch information
briandfoy committed Sep 13, 2023
1 parent 1bb595e commit 1dc3d32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/nl
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ sub print_line {
}
elsif ($type eq 't')
{
my $match = /^$/ ? 0 : 1;
my $match = $line =~ /\A\Z/ ? 0 : 1;
print_number($match);
}
elsif ($type eq 'n')
Expand All @@ -182,12 +182,12 @@ sub print_line {
}
elsif ($type eq 'p')
{
my $match = /$regex/ ? 1 : 0;
my $match = $line =~ /$regex/ ? 1 : 0;
print_number($match);
}
elsif ($type eq 'e')
{
my $match = /$regex/ ? 0 : 1;
my $match = $line =~ /$regex/ ? 0 : 1;
print_number($match);
}
else
Expand Down

0 comments on commit 1dc3d32

Please sign in to comment.