Your skill will accomplish
what the force of many cannot
Re: Using a hash with the @ sigilby 1nickt (Canon)
|on Jul 26, 2015 at 19:04 UTC
Replying to myself for the archives ...
Not more than a couple of days after posting this and learning from the replies, I had cause to use a hash slice in my work. In a sub that can be called with a single argument consisting of a single value or a list, I was returning a hashref of objects in all cases.
Much better to return the object directly if the sub is called with a single value:
Very cool. Thanks again, monks.
The way forward always starts with a minimal test.