in reply to Peek a hash without breaking iterator

I guess. What happens if you avoid each?

foreach my $key ( keys %hash ) { print qq($key => $hash{$key}\n); my %other_hash = %hash; }

If i run this, i don't get an infinite loop...

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^2: Peek a hash without breaking iterator
by Anonymous Monk on Jun 20, 2016 at 21:16 UTC

    If i run this, i don't get an infinite loop...

    Hurricup is writing a debugger, his debugger cannot be rewriting the users code while its running the code, the user isn't going to like that,

      "Hurricup is writing a debugger...rewriting the users code..."

      Yes, sure. It interested me to see what happens, as i wrote. Or should i check out his plugin code (if available) and so on...?

      «The Crux of the Biscuit is the Apostrophe»

      "Hurricup is writing a debugger...rewriting the users code..."

      Yes, sure. It interested me to see what happens, as i wrote. Or should i check out his plugin code (if available) and so on...?

      «The Crux of the Biscuit is the Apostrophe»