in reply to Need help in accessing subroutines in perl scripts in perl modules.

If, as reported, you are seeing the error with getIP() but not with getHosts() it is quite possible that getIP is not actually the correct name of the sub. Since we cannot see Utili.pl it's rather hard to diagnose beyond that. Is this the entirety of the error messages which are displayed?

An SSCCE would help your cause considerably.

  • Comment on Re^2: Need help in accessing subroutines in perl scripts in perl modules.

Replies are listed 'Best First'.
Re^3: Need help in accessing subroutines in perl scripts in perl modules.
by srikanthp1 (Initiate) on Jun 17, 2016 at 06:08 UTC

    Hi, getIP() is correct name, its not only this subroutine, whatever subroutines which were present in the /tmp/utils/Utili.pl perl script if i call in test2.pm iam getting the same error. the same subroutines are working if i call in test1.pm in both the modules, iam using the below lines to access the subroutines. require "/tmp/utils/Log.pl"; require "/tmp/utils/Utili.pl"; anything wrong iam doing here ???