Bookmark and Share PERL - First Script With PERL installed we are ready to dive into our first script. There are a few elements every PERL script must contain in order to function. Open up your favorite simple text editor, the file extension for PERL scripts is .pl. Save your files with this extension. Advertise on Tizag.com The first line of every PERL script is a commented line directed toward -- somewhere in the documentation of your web server, or email your web host and they can specify your Perl installation directory. Perl - HTTP Headers Because we are working in a web environment we are sort of jumping ahead of the game. We have to introduce some HTTP headers so that Perl understands we are working with a web browser. To do this we have to run another line of strange code called an HTTP header as you may have guessed. It looks something like this: firstscript.pl: #!/usr/bin/perl -- print "Hello, Perl!"; Display: Hello, Perl! You should see "Hello, Perl!" in the top left corner of your browser. If you have a problem, ask about it on the Perl Forum Perl - Execute Your First Script Now it is time to upload your firstscript-linux.pl to your web server and execute it. After you upload your file be sure to CHMOD the script