in reply to my, scope, and references
Think of all user-visible variables in Perl as heap allocated (but don't worry about having to free them yourself). It's fine style.