I also found a nice little solution. In fact it only gives you the nt login name of the client box.
You need the IpInfo module which I found in the sources of NBTscan. http://www.inetcat.org/software/nbtscan.html
use IpInfo;
...
my $info = new IpInfo($cur_ipaddr);
print $info->nbUserName();