On Thu, 13 Nov 2008 11:24:27 +0100, Paul Johnson wrote: > On Thu, Nov 13, 2008 at 10:12:25AM +0000, Peter Haworth wrote: > > > while(my $k=each %h){ > > # Explicit iteration of keys > > } > > > > You could argue that making it robust in the face of false keys > > reduces the subtlely somewhat, but the extra unwieldiness also > > obscures the intent somewhat in my view: > > > > while(defined(my $k=each %h)){ > > } > > $ perl -MO=Deparse -e 'while(my $k=each %h){}' > while (defined(my $k = each %h)) { > (); > } > $ Rats, I did wonder whether that had been fixed, similar to the while($line=<>){} protection, but I didn't think to actually test it. -- Peter Haworth pmh@edison.ioppublishing.com "On an enjoyment level, this is somewhere between repeatedly trapping my finger in a door, and sandpapering my gums." -- Mikefule