in reply to Re^2: Hash from package
in thread Hash from package

for my $key (keys %{$car}){ print "$key -> $car->{$key}\n"; }
Directly accessing the attributes of an object like that would likely be considered poor form.

Have a look through the docs and look out for 'getters' and 'setters'.

Object-Oriented Tutorial specifically discusses getters and setters.

updated: added link to tutorial

Replies are listed 'Best First'.
Re^4: Hash from package
by Yoda_Oz (Sexton) on Jan 04, 2007 at 10:13 UTC
    thanks man, ive been looking all day for some info on perl objects. much appreciated!