in reply to undefined subroutine &main

Upd::Common::System does not appear to be a module from CPAN. Check the documentation for this module, it might not export anything. If the suggestion from perl_lover does not work then try:
$pid = Upd::Common::System::getRemoteProcessIds (10.255.22.69, "HUDSON +", 4711);
but really you should read the module's documentation before using it.

Replies are listed 'Best First'.
Re^2: undefined subroutine &main
by bharatbsharma (Acolyte) on Nov 30, 2010 at 09:49 UTC
    Yes, I have written this perl module . But i believe code in BEGIN of main script should import this module. So i want to find what mistake i am making?

      So, does your module export the routine? You don't show us the relevant parts of your module, so it is hard for us to help you better. Maybe you want to use Exporter in your module?

      package Upd::Common::System; use strict; use Exporter 'import'; # gives you Exporter's import() method directly @EXPORT_OK = qw(getRemoteProcessIds); # symbols to export on request

      ... and in your main program:

      use Upd::Common::System qw( getRemoteProcessIds );
Re^2: undefined subroutine &main
by bharatbsharma (Acolyte) on Nov 30, 2010 at 10:20 UTC
    Thanks a lot . Solution given by is working .