in reply to Pulling an item to the front of the list

Perhaps something like this is what you want.

for my $k (grep { defined } delete $hash{Foo}, keys %hash) { # ... do stuff here }
Though, the other ways mentioned so far may be more clear (i.e. not appear to work by accident ;-)
update: I'll claim distraction by my wife for such messed up text :-)

Replies are listed 'Best First'.
Re^2: Pulling an item to the front of the list
by tbone1 (Monsignor) on Oct 04, 2006 at 11:57 UTC
    Ooooo what a lucky man he was!

    --
    tbone1, YAPS (Yet Another Perl Schlub)
    And remember, if he succeeds, so what.
    - Chick McGee