perldoc -f defined [snip] Use of "defined" on aggregates (hashes and arrays) is deprecated.