Re: no number return

2006-11-30 Thread D. Bolliger
Chris Parker am Donnerstag, 30. November 2006 14:57: > Adriano Ferreira wrote: > >> STDIN and then make a loop for them. So you should remove the > >> construction of @numbers from the loop, doing > > > > Code now is: > > print("Enter widths separated by spaces: \n"); > my @numbers = split /\s+/, <

Re: no number return

2006-11-30 Thread Chris Parker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adriano Ferreira wrote: > >> STDIN and then make a loop for them. So you should remove the >> construction of @numbers from the loop, doing > > > > Code now is: > print("Enter widths separated by spaces: \n"); my @numbers = split /\s+/, <>; for my

Re: no number return

2006-11-30 Thread Adriano Ferreira
On 11/30/06, Chris Parker <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adriano Ferreira wrote: > On 11/30/06, Chris Parker <[EMAIL PROTECTED]> wrote: >> while(@numbers = <>) { >> >> # Extract widths @width = split(" ", $numbers); > > Here at this piece of code, @numbe

Re: no number return

2006-11-30 Thread Chris Parker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adriano Ferreira wrote: > On 11/30/06, Chris Parker <[EMAIL PROTECTED]> wrote: >> while(@numbers = <>) { >> >> # Extract widths @width = split(" ", $numbers); > > Here at this piece of code, @numbers and $numbers are different > variables. And you nev

Re: no number return

2006-11-30 Thread Adriano Ferreira
On 11/30/06, Chris Parker <[EMAIL PROTECTED]> wrote: while(@numbers = <>) { # Extract widths @width = split(" ", $numbers); Here at this piece of code, @numbers and $numbers are different variables. And you never assign anything to $numbers. Probably you want this: while (

no number return

2006-11-30 Thread Chris Parker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am trying to get this to take random amount of widths and compute the square footage for each. For example: Enter Total Square Footage: 1234 Enter widths seperated by spaces 3 4 5 size 3: amount needed = 0 size 4: amount needed = size 5: amount n