JE> Oh, yeah, of course, sorry. The "Bareword ..." message is a compile time
JE> error while the require/import would be done at run time, i.e. way
JE> later.
JE> Not sure what to do about it, I'm not familiar with Socket or what
JE> AF_INET is. I guess maybe you could use a fully qualified name.
AF_INET is a constant that shouldn't be needed in common socket
code. he should be using IO::Socket instead which has a better API and
less need of obscure constants.
the OP should post the whole section of code with the socket stuff. and
if he does need it, he can't do require and even import since the import
has to be done at compile time for the constant to be declare properly
and then parsed that way in his code. putting the import into a BEGIN
would only help if the module were also loaded there but that becomes
use again.
another solution is to move all the code that involves the socket stuff
to its own module, call use Socket in there, and load his module on
demand.
uri