in reply to Re^2: Hash from package
in thread Hash from package
Directly accessing the attributes of an object like that would likely be considered poor form.for my $key (keys %{$car}){ print "$key -> $car->{$key}\n"; }
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 |