in reply to Re^2: Undefined subroutine &main::func1
in thread Undefined subroutine &main::func1 [SOLVED]

Ah. I think I mixed that up with the inadvertently-prototype-creating use of '()'. Thank you for the elaborated enlightenment.

I must admit that I hadn't run the "problematic" code. I just did, and made the following observations.

  1. first, I tried it in the same directory, changing the file name to TestClient.pm and modified package name use statement accordingly.
    The thing worked.
  2. now I created Net and Net//SNTP folders, moved and renamed the .pm file.
  3. After receiving a "can't locate in @INC" message I realized I hadn't correctly moved the module :-)
  4. Now i got the message in the OP! - (although line 8, not 9)
  5. Then it dawned on me: I hadn't changed back the package statement! After correcting this, it worked again.
So, thanos1983, I bet the module in your post are different from ehat you have on your disc. Check the spelling in your package statement!