perl -e 'print `hostname`'
perl -e 'print `ip addr show`'
Have you looked at Sys::Hostname? Or maybe you wanted gethostbyaddr? I'm not exactly sure which of the two you want, because you talk of a "Computer that is running the script", and you also talk of "on the server side" - a Perl script is run on one computer.
If you're thinking of a script that runs on a webserver, and which is triggered by a client connecting, then you want gethostbyaddr, together with (I believe) $ENV{CLIENT_IP}.
If you're thinking of a script that many clients in your network run, then Sys::Hostname is what you want.
perlmonks.org content © perlmonks.org and Corion, explorer, paranoid times
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03