    sub do_nothing_useful {
        my($a, $b, $c);
        $a = new A;
        $a->does_nothing_either();
        $b = new B;
        $c = "frog";
        return ($a, $c);
    }

These are calls to the constructor `new` in the object classes.

This function returns a two-element list.

The destructor (`DESTROY`) for the object `$b` will be called automatically for this object since there can be no other references to it outside this function.