in reply to Unexpected warning
You get that warning on that line if $something is undefined. Although in that case you also ought to get another warning as well, about using an uninitialized value in a hash element on the calling line.
In Section
Seekers of Perl Wisdom