Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. It was one of the most popular scripting programming languages.
Whenever a browser sends a request for a page, it also sends a number of other headers to the script, containing information such as the browser type. It also includes information such as the visitors IP address.
The following Perl code will display the visitor’s IP:
$ENV{‘REMOTE_ADDR’}