use strict; use warnings; my $module = 'Net::SNTP::Client'; # change module name here if necessary (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;