in reply to Win32::API Question

It's $InitTelnetClients that's undefined. Looks like your call to new. failed.

Win32::API's new sets $! on error (according to the documentation), so you could do something like:

$InitTelnetClients = Win32::API->new('Telnet', 'InitTelnetClients', 'N +', 'I') or die("Unable to load telnet DLL: $!\n");

By the way, the indirect calling syntax (method class args) is fragile and/or unreliable. You should used the direct calling syntax (class->method(args)) as shown.