How do I use perl?

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

How do I use perl?

Post 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?
New User
New User
Posts: 44
Joined: Wed Apr 23, 2008 2:14 pm
Blog: View Blog (0)

Re: How do I use perl?

Post 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 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
Posts: 270
Joined: Sun Apr 13, 2008 11:16 am
Blog: View Blog (0)

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests