New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested Iterations on a Hash Work Correctly #441
Comments
From mike@tecc.co.uk#!/usr/bin/perl -w # I'm using perl version 5.004_04 built for sun4-solaris use strict; my %hash = (foo => "fish", foreach my $i (keys %hash) { Site configuration information for perl 5.00404: Configured by stuart at Wed Jan 14 11:34:01 GMT 1998. Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration: Locally applied patches: @INC for perl 5.00404: Environment for perl 5.00404: |
From [Unknown Contact. See original ticket]Mike Taylor <mike@tecc.co.uk> writes:
Yes, but in _current_ perls when you use keys %hash in a foreach If you recast your example : use strict; my %hash = (foo => "fish", while (defined(my $i = each %hash)) { You will see the documented behaviour. foreach _may_ behave -- |
Migrated from rt.perl.org#1282 (status was 'resolved')
Searchable as RT1282$
The text was updated successfully, but these errors were encountered: