RE: [Perl-unix-users] foreach and an array of hashes

2003-03-13 Thread Wagner, David --- Senior Programmer Analyst --- WGO
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

[Perl-unix-users] foreach and an array of hashes

2003-03-13 Thread Markham, Richard
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]