25, 'name'
=> 'Joe'
} ];
Your print print $curemp{name}; should
look like print $curemp->{name};
Also might want a linefeed otherwise they all come
together.
Wags ;)
-----Original Message-From: Markham, Richard
[mailto:[E
Title: foreach and an array of hashes
is it possible to foreach through and array of hashes
and reference the objects attributes?
In testing I am just trying to print each employee name.
my @emp;
$emp[0]=new_employee("Bob",50,"Cook");
$emp[1]=new_employee("Jane",20,"Receptionist");
$emp[2]