Hello Greg,
> Thanks for you comments. Is this the best way then? Seems to work, but
I'm
> curious what could be any better..
Your version is fine. Here's mine, just so you have another take on how to
do some things. Among a few other things, I added checking for so that the
guess has to be a
On Apr 15, 2004, at 1:24 PM, Greg Donald wrote:
On Thursday 15 April 2004 12:43 pm, James Edward Gray II wrote:
Looks like you already got some good answers. Let me add a few minor
comments...
Thanks for you comments. Is this the best way then? Seems to work,
but I'm
curious what could be any
On Thursday 15 April 2004 12:43 pm, James Edward Gray II wrote:
> Looks like you already got some good answers. Let me add a few minor
> comments...
Thanks for you comments. Is this the best way then? Seems to work, but I'm
curious what could be any better..
#!/usr/bin/env perl
use Math::Ran
On Apr 15, 2004, at 10:40 AM, Greg Donald wrote:
Learning Perl here.. So I wrote this number guessing script but can't
see
what is wrong with it. I can never get the solution even when I know
it's
correct. What am I doing wrong?
Looks like you already got some good answers. Let me
In a message dated 4/15/2004 12:09:40 PM Eastern Daylight Time,
[EMAIL PROTECTED] writes:
Learning Perl here.. So I wrote this number guessing script but can't see
what is wrong with it. I can never get the solution even when I know it's
correct. What am I doing wrong?
[Snipped Cod
(my $guess = ); 'my' is your problem.. that creates new varialbe remove it..
HTH
Jay
-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 11:41 AM
To: [EMAIL PROTECTED]
Subject: guessing script
Learning Perl here.. So I wrote t
Learning Perl here.. So I wrote this number guessing script but can't see
what is wrong with it. I can never get the solution even when I know it's
correct. What am I doing wrong?
#!/usr/bin/env perl
use Math::Random;
use strict;
sub run(){
my $solution = random_uniform_in