Everything you have said is correct, but for the phrase "using that code it should... call the WasonE subroutine". The code you have posted doesn't automatically call the WasonE subroutine, it is just imported into your namespace. You need to add a manual call to the subroutine:
#!/usr/bin/perl -wT use strict; use CGI qw(:standard); use lib "/home/public_html/cgi-bin"; use DATA99 qw(WasonE); WasonE();
As for the errors being genereated in your error log, it has nothing to do with the code segments you've posted here. The warnings would be coming from within the WasonE() subroutine and are being added to your error log because you've globally enabled warnings (via the '-w' switch on the shebang line). Try adding the WasonE(); line and if you've programmed things correctly/logically, it should work fine.
In reply to Re: external subroutine
by saskaqueer
in thread external subroutine
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |