in reply to Re: Anon Struct Instance
in thread Anon Struct Instance

You wrote:
> Thanks all. I think the orignal was not working because of the $$sn->datetime($datetime) line,
> not because of the $$sn = new DEVICE line. The failure was, I think, in not dereferencing. It
> didn't care about the anon $$sn, but $$sn was literally holding a memory address.

The -> operator does the dereferencing, but I think
$$sn->datetime($datetime)

actually means
$($sn->datetime($datetime))

and not
($$sn)->datetime($datetime)

So, it was trying to dereference the wrong thing.

Glad you got it working! Have fun.

Alan