develooper Front page | perl.beginners | Postings from March 2002

reseting a while loop that uses each?

Thread Next
Nikola Janceski
March 6, 2002 06:02
reseting a while loop that uses each?
Message ID:
foreach my $file (keys %NEW){
	$rev = (keys %{$NEW{$file}})[0];
	while (my ($cfile, $ids) = each %COOR){
		if( grep $NEW{$file}{$rev}[2] == $_, @{ $ids } ){
			$RELATION{$file} = $RELATION{$cfile};

it seems that the 'while(each)' statement doesn't get reset when I do a
it starts where it left off. How can I reset it?

Nikola Janceski

Anyone who has never made a mistake has never tried anything new.
-- Albert Einstein (1879-1955) 

The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About