diff options
author | Jim Meyering <jim@meyering.net> | 2001-02-04 14:04:42 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-02-04 14:04:42 +0000 |
commit | 23d47fb4aab800da7f17a713581540dc04c9b04a (patch) | |
tree | 26880d90b0754d1c92611683fbd4665043745838 /src | |
parent | 6bb0a39d24772835466274eeb22d2010f65d0bc2 (diff) | |
download | coreutils-23d47fb4aab800da7f17a713581540dc04c9b04a.tar.xz |
*** empty log message ***
Diffstat (limited to 'src')
-rwxr-xr-x | src/wheel-gen.pl | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/wheel-gen.pl b/src/wheel-gen.pl index 74ad32425..a944b91c5 100755 --- a/src/wheel-gen.pl +++ b/src/wheel-gen.pl @@ -6,7 +6,7 @@ use strict; use Getopt::Long; -(my $VERSION = '$Revision: 1.2 $ ') =~ tr/[0-9].//cd; +(my $VERSION = '$Revision: 1.3 $ ') =~ tr/[0-9].//cd; (my $program_name = $0) =~ s|.*/||; my $debug = 0; @@ -65,16 +65,7 @@ sub END # die "$program_name: FIXME - process $arg here" # } - my $n = $ARGV[0]; - - my $is_prime = - { - 2 => 1, - 3 => 1, - 5 => 1, - 7 => 1, - 11 => 1, - }; + my $wheel_size = $ARGV[0]; sub is_prime ($) { @@ -103,9 +94,9 @@ sub END } my $prod = 2 * 3 * 5; - my $last_prime = 1; + my $last_prime = 2; my $i; - for ($i = 2; $i < 2 * $prod; $i++) + for ($i = 3; $i < 2 * $prod; $i++) { if (is_prime $i) { |