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
    Thank you for your reply.

    Are you using Eclipse with EPIC and using the debugger to step through the code ?

    The code works for me too, but my problem is with the debugger.

    P.S. the missing quote before wilma was a typo. Corrected it in the original post.