in reply to Infinite loop with each
This code works fine for me:
my %some_hash = ("foo", 35, "bar", 12.4, 2.5, "hello", "wilma", 1.72e +30, "betty", "bye\n"); my $s = 0; while ( my ($key, $value) = each %some_hash ) { print("number". $s++); print "$key => $value\n"; }
But as you can see i add quote to the left of wilma"...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Infinite loop with each
by Kursad (Initiate) on Jun 05, 2008 at 04:05 UTC | |
by Gangabass (Vicar) on Jun 05, 2008 at 04:52 UTC |