in reply to Re^2: Perl objects
in thread Perl objects

My doubt it how to access this display method using the object.

First you create an object calling class method new

my $foo = Employee->new;
Then you call the object method display, on the object $foo
$foo->display;

I suggest you review carefully the book/tutorial which taught you about package ... because calling methods is basic syntax.

Its covered in various places, including the free book Modern Perl a description of how experienced and effective Perl 5 programmers work....You can learn this too.

Also, FYI, you have a question, not a doubt, see "Question" vs "Doubt"

The other Anonymous monk

Replies are listed 'Best First'.
Re^4: Perl objects
by pr09 (Novice) on Jun 14, 2011 at 07:24 UTC
    Thanks for the help. Will read the book.