in reply to Accessing ARRAYS inside objects

The documentation of Class::Struct says that $a->b in this case returns an array reference, so you can do:
@{$a->b} = @q;
and
@x = @{$a->b};
see documetation like perlreftut, perllol, and perlref for more details

Update: just wanted to note you should realize that these statements really copy the elements from one array to the other. It's often more efficient to pass array references around instead; see the docs I linked to.

Replies are listed 'Best First'.
Re^2: Accessing ARRAYS inside objects
by Dasaan (Beadle) on Jun 13, 2004 at 01:04 UTC
    Very helpful. I spent far too long trying to work this out myself.
A reply falls below the community's threshold of quality. You may see it by logging in.