in reply to log the ip of the executor

For the local IP address, try Net::Address::IPv4::Local. From the Synopsis:
use Net::Address::IPv4::Local; # Get the local system's IP address that is "connected" to # "the internet": my $address = Net::Address::IPv4::Local->public; # Get the local system's IP address that is "connected" to # the given remote IP address: my $address = Net::Address::IPv4::Local->connected_to($remote_addr +ess);

-Mark