use 'my' in while and foreach loop
Merge pull request #93 from ghost/master

use 'my' in while and foreach loop