Tuesday, 4 March 2014

Accessing a function from perl module

package john;

sub john_home
{
chomp;
$i=shift;
if ( $i eq "y" || $i eq "Y" )
{
$j="working";
return $j;
}
}

1;

########################################################




use john;


$d=john::john_home("y");


print "$d\n";'


########Result##################


working




No comments:

Post a Comment