in reply to Re: undefined subroutine &main
in thread undefined subroutine &main

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?

Replies are listed 'Best First'.
Re^3: undefined subroutine &main
by Corion (Patriarch) on Nov 30, 2010 at 09:59 UTC

    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 );