I'm trying to use the Class::Struct to create some C-Like structs but I'm unable to dereference any array elements in the struct. I'm admittedly a Perl newbie trying to map my C programming experience into Perl so it's possible I'm "thinking in C" rathern than in Perl. I've referenced several texts and web references on the subject and get several ways to create a structure. In each case I'm unable to access any elements in the structures once they are initialized.
Here is an example taken straight out of Programming Perl (3rd ed) : use Class::Struct; struct Manager => { # Creates a Manager->new() constructor. name => '$', # Now name() method accesses a scalar value. salary => '$', # And so does salary(). started => '$', # And so does started(). }; struct Shoppe => { # Creates a Shoppe->new() constructor. owner => '$', # Now owner() method accesses a scalar. addrs => '@', # And addrs() method accesses an array. stock => '%', # And stock() method accesses a hash. boss => 'Manager', # Initializes with Manager->new(). }; $store = Shoppe->new(); $store->owner('Abdul Alhazred'); $store->addrs(0, 'Miskatonic University'); $store->addrs(1, 'Innsmouth, Mass.'); $store->stock("books", 208); $store->stock("charms", 3); $store->stock("potions", "none"); $store->boss->name('Prof L. P. Haitch'); $store->boss->salary('madness'); $store->boss->started(scalar localtime); print "owner: $store->owner"; $someowner = $store->owner; print "owner: $owner"; print "addrs: $store->addrs"; @some_addrs = $store->addrs; print "addrs: @some_addrs"; I've tried alot of different ways to dereference these fields but keep getting nothing on the output. I'm also looking all over for more usefull examples (apps) but am stumped. Thanks in advance, Ed -- Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>