If you really want to get to the bottom of the error, look at the error log file of the web server. It will state the exact reason for the error. If you don't understand the error then searching for it on Google will give you more details and probably the exact solution to the problem. Things never just stops working for no reason.
The answers below assume that your web site is hosted on a Linux based web host:
In my experience the most common error in this kind of scenario is that the file permission of the file changed when you edited it or updated it. Perl files or cgi files need the permission setting of 755 (set to executable) to work. In other words the file needs to be set to be executable. If you are using FTP to update/transfer the file there will normally be an option in the FTP program to set the file permission setting to 755 on the server. (with your ftp program) If you are in a Linux terminal window you can use chmod to set the permission setting of the file. Also double check that the directory holding this file has the permission setting of 755
This is rare but happens: If you are using FTP to transfer the file to the server then it might be that it did not transfer properly. (Broken connections, sluggish internet, etc.) Try to re-transfer the file. You can also compare the file sizes of the one you have offline and the file on the server to make sure that they are the same.
This answer assume that you are using windows (opened the file in Windows to edit) and have a Linux based server. If you used a text editor to open the file and your web host or web server is Linux based make sure that you saved the file in the Unix file format. There are many good or more advanced text editors out there that will enable you to read and save files in the unix file format. Get a good text editor like Textpad (free to try) to open the file and save it in the Unix file format.
If you're new to Perl/CGI scripts then the best advice would probably be to make a backup of the file before you make changes to it. The 3 solutions above are probably some of the most common problems if there is nothing wrong with the code.