try my $class = shift; or my ($class) = @_;, but the above is assigning the 'length' of @_ (probably 1) to $class, so your objects aren't being properly blessed.package Vehicle; sub new { my $class = @_; ...
(there are other problems with the code, see other responses, don't expect this comment to solve everything)
In reply to Re: Stuck on packages
by mreece
in thread Stuck on packages
by Yoda_Oz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |