Noob question

Posted by a7v1n on 2010-09-06 12:02


I am a newbie to Perl and I like to know how perl scripts are used. I do not see a .pl in the addressbar of the browser in most of the websites I visited. Are perl scripts run at the background? or if it is part of an html frame? What if I want to create a guestbook using perl? Is it ok to have a .pl as the extension of my webpage?

Thanks for the help...

kalvaro2 | Tue, 2010-09-07 03:50

The key point is that there are two different concepts out there: URLs and file system paths.

The URL is the location of a resource, typically somewhere in the Internet: h t t p : / / w w w . e x a m p l e . c o m / c u s t o m e r s

The file system path is the location of a file or folder, typically in a hard disk: C:\Sites\example\htdocs\customers\index.html

Most web servers can be configured to map URLs to whatever file, script or other URL you possibly need to.

If you are interested in developing dynamic web sites, my advice is to install a web server in your computer (Apache is a popular choice) and learn first some basic HTML and CSS. Whatever your Perl script will ever do, it will probably need to generate some HTML.

(I've had to mangle the sample URL so the forum spam filter lets the post go through.)

inmalathi | Tue, 2010-09-07 08:35

Perl script are used; but with the cgi extension (i.e. index.cgi); where cgi - Common Gateway Interface. You can get more infomration in s e a r c h dot c p a n dot o r g site; if you search for cgi.