So, because web sites involve many files and directories, that are interrelated, there is need to have small programs or scripts available to help automate common, repetitive tasks. Among web masters, Perl is a popular choice for programming. It has strong string handing capabilities and it's easy to use. Unlike C, it has built-in memory management. Unlike C++ or Java, the language itself has a large number of useful functions, so there's little need to find special packages for string processing, sorting, file management, etc. It is also an interpreted language, so there's no need for a separate compilation step. Just type in a script as a text file, set the x bit (chmod a+x file.pl) and run it.
Perl is object oriented, so a Perl program can be separated into separate modules (like C++ classes), objects can be created and code can be reused. There's a large and growing collection of reusable software components called modules. Chances are that someone has already written a useful module to do what you want. The problem is finding it. The Comprehensive Perl Archive Network (CPAN) provides centralized location for archiving Perl modules. Perl is truly multi-platform. It's available for Unix and countless other platforms.
Perl can be utilized in many ways on your web site. The most common use is Common Gateway Interface (CGI) scripting. There are thousands of CGI programs available from authors around the world. These programs run on the web server and accept input from users. The input is processed by the script and the output is send back to the user. Check out the CGI Resources available here.