%f=1..4; while(($k)=keys%f) { print qq!($k)=($f{$k})\n!; delete $f{$k} } [download]
In reply to Re^7: What is happening ? by grizzley in thread problem using foreach and each with hash ref by vinoth.ree