in reply to Re^3: Undefined subroutine &main::func1
in thread Undefined subroutine &main::func1 [SOLVED]
use strict; use warnings; my $module = 'Net::SNTP::Client'; # change module name here if necessa +ry (my $file = $module) =~ s!::!/!g ; $file .= '.pm'; print "looking for $file\n"; my $found = 0; for (@INC) { my $look = "$_/$file"; if (-e $look) { print "Hooray! found it: $look\n"; ++$found; } else { print "NOT found: $look\n" } } print "PROBLEM: found $found files instead of 1 (one)\n" if $found != +1;
|
|---|