in reply to Condensing code...golfing with push and return
You could do
sub test { return ($results[ @results ] = $object->createNewObject() ) || pop @results; }
which I think is syntactically equivalent to your original. Whether you would want to is another matter :)
|
|---|