From ba6c8aaaa451dd989faffaacbf4373f9c72bda64 Mon Sep 17 00:00:00 2001 From: Michael Mikonos <127171689+mknos@users.noreply.github.com> Date: Wed, 26 Feb 2025 12:27:53 +0800 Subject: [PATCH] random: small tidy Variable $warnings does not vary so delete it. --- bin/random | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/random b/bin/random index f1fc3d36..35f15c47 100755 --- a/bin/random +++ b/bin/random @@ -17,7 +17,6 @@ use Getopt::Std; my ($VERSION) = '1.3'; -my $warnings = 0; my %options; getopts('er', \%options) or usage(); my $denominator = shift; @@ -32,8 +31,7 @@ $| = 1 if exists $options {r}; my $frac = 1 / $denominator; while (<>) {print if $frac >= rand;} - -exit $warnings; +exit 0; sub usage { warn "usage: $0 [-er] [denominator]\n";