As you can see, the warning is printed before the script runs, because it’s a compile-time warning, as BrowserUksays. But in both cases, the result of the assignment is that $hash->{name} contains helloworld, showing that $i eq 'one' is true. What makes you think that $i becomes not equal to 'one'?