I made an "oops!" when I wrote:
>
> prime.pl:
> #!/usr/bin/perl
> # print "2\n";
> my $num;
> for ($num = 3; $num < 10000; $num+=2)
> {
>         my $prime = 1;
>         for $check ( 2 .. int($num/2) )
>         {
>                 if ($num % $check == 0)
>                 {
>                         $prime = 0;
>                         last;
>                 }
>         }
> #        print "$num\n" if $prime;

Disregard the comment characters there. I added them in after testing (to
see how much of an effect the output made -- wasn't noticeable) and forgot
to remove them when c+p'ing the source to the newsgroup.

-- Daniel Grace



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to