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"
|