bharatbsharma has asked for the wisdom of the Perl Monks concerning the following question:
I have a package Upd::Common::System (.pm file) in $HOME/Upd/Common where getRemoteProcessIds is defined and in $HOME/bin I have main script given below in . When i run main script i get an error - Undefined subroutine &main::getRemoteProcessIds called at . How to correct?$HOME/bin $HOME/Upd/Common
BEGIN { my $perl_failed = $@; my $HOME = "/home/Z001T7BX"; $ENV{PERL5LIB} .= ":$HOME"; # for child processes push @INC, $HOME; # for this process unless ( grep m{\A${HOME}/bin}, split(":", "$ENV{PATH}") ) { $ENV{PATH} .= ":$HOME/bin"; # for child processes } $ENV{HOME} = $HOME; # for child processes } use Upd::Common::System; my $pid; $pid=getRemoteProcessIds (10.255.22.69, "HUDSON", 4711);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ndefined subroutine &main
by perl_lover (Chaplain) on Nov 30, 2010 at 06:33 UTC | |
|
Re: undefined subroutine &main
by cdarke (Prior) on Nov 30, 2010 at 09:26 UTC | |
by bharatbsharma (Acolyte) on Nov 30, 2010 at 09:49 UTC | |
by Corion (Patriarch) on Nov 30, 2010 at 09:59 UTC | |
by bharatbsharma (Acolyte) on Nov 30, 2010 at 10:20 UTC | |
|
Re: undefined subroutine &main
by locked_user sundialsvc4 (Abbot) on Nov 30, 2010 at 14:27 UTC |