#! c:/perl/bin/perl.exe use strict; use warnings; my %h = ( 1 => 1111111, 2 => 2222222, 3 => 3333333, 4 => 4444444, 5 => 5555555, ); my $ind = 0; my $item = (sort(keys(%h)))[$ind++]; do { print "Processing $item \n"; my $new = $item*10; $h{$new} = $new; print " Addding $new\n"; $item = (sort(keys(%h)))[$ind++]; } while (1); print 'good luck \n';
20030417 Edit by Corion: Added code tags
In reply to Re: foreach loop question
by mod_alex
in thread foreach loop question
by dda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |