Skip to content

Commit ba6c8aa

Browse files
authored
random: small tidy
Variable $warnings does not vary so delete it.
1 parent f2d8543 commit ba6c8aa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bin/random

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use Getopt::Std;
1717

1818
my ($VERSION) = '1.3';
1919

20-
my $warnings = 0;
2120
my %options;
2221
getopts('er', \%options) or usage();
2322
my $denominator = shift;
@@ -32,8 +31,7 @@ $| = 1 if exists $options {r};
3231
my $frac = 1 / $denominator;
3332

3433
while (<>) {print if $frac >= rand;}
35-
36-
exit $warnings;
34+
exit 0;
3735

3836
sub usage {
3937
warn "usage: $0 [-er] [denominator]\n";

0 commit comments

Comments
 (0)