by Mortecai4 on Fri May 09, 2008 3:27 pm ([msg=2179]see How do I use perl?[/msg])

I tried using perl before,where i typed the code into notepad and saved it as a .cgi file.When i tried to open it, it gave me an error.Can someone show to correctly write in perl?Is perl compiled or interpreted?

by BhaaL on Sat May 10, 2008 5:20 am ([msg=2198]see Re: How do I use perl?[/msg])

Perl is interpreted, therefore you need the perl executable at least (Check out perl.org). Also, .cgi is meant for webpages using perl as backend, what you want is .pl. To run it, either put a shabang as first line with correct path (ie. #!/usr/bin/perl) or pass it as parameter to the perl interpreter (ie. perl myScript.pl)