best scenarios of using Perl

J

Joe

I want to ask what are the practical applications to use Perl? Perl CGI
scripts? But it can be done with ASP, JSP, and CGI is proven to be
slow. What are the best scenarios Perl should be the best choice?

Please advise. thanks!!
 
G

Gregory Toomey

Joe said:
I want to ask what are the practical applications to use Perl? Perl CGI
scripts? But it can be done with ASP, JSP, and CGI is proven to be
slow. What are the best scenarios Perl should be the best choice?

Please advise. thanks!!

Use Perl or awk for cgi, you cant go wrong.

gtoomey
 
U

usenet

Joe said:
I want to ask what are the practical applications to use Perl? Perl CGI scripts?

Perl is a powerful and versatile language for CGI scripts. Any
performance penalties it carries can be mitigated with the use of
webserver enhancements such as mod_perl or FastCGI, which enable Perl
CGI scripts to run as fast as any other server-side scripting language.
 
J

Joachim Pense

Am 12 Nov 2005 21:42:36 -0800 schrieb Joe:
I want to ask what are the practical applications to use Perl? Perl CGI
scripts? But it can be done with ASP, JSP, and CGI is proven to be
slow. What are the best scenarios Perl should be the best choice?

Everything that requires analysis of text data, for example ETL in data
warehouses.

Joachim
 
J

Juha Laiho

Joe said:
I want to ask what are the practical applications to use Perl? Perl CGI
scripts? But it can be done with ASP, JSP, and CGI is proven to be
slow. What are the best scenarios Perl should be the best choice?

Some words were already written about using something else than CGI
interface, and still writing in perl.

Another issue is that not al the workd is web -- there are good non-web
uses as well. Perl seems to excel in areas of transforming and summarising
data (well, "Practical Extraction and Reporting Language" should give
a clue..).

Back to the world of web; if you happen to run Apache as your web server,
it is possible to extend (or modify) the functionality of the web server
itself with perl.

For example, consider the following situation:
There's a system running Apache in reverse-proxy configuration (frontend
for other web servers, among others, handling the SSL crypto stuff and
just running a plain http with the backend servers). One day, someone
comes by and tells that it is decided that for one of the backend systems
it has been decided to use SSL client certificates for user authentication
(and that the user identity must be known to the backend). But hey, all
SSL work is done at the frontend, the backend doesn't even have SSL
capablity. What was done at this point was a small perl extension on the
frontend to extract the SSL client certificate information from the
inbound request, and forward the information as auxiliary HTTP request
headers to the backend server. Perhaps 20 lines of code in total in the
proxy, and a very simple solution for the backend server.
 
X

xhoster

Joe said:
I want to ask what are the practical applications to use Perl?

Too many to list. I do practically everything in Perl, making use of
the DBI and Inline families of modules, and system, to interface with
other languages when that is beneficial.
Perl CGI
scripts? But it can be done with ASP, JSP, and CGI is proven to be
slow.

I've seen many perl CGI re-written into JSP to 'make them faster'. But
I've only seen one actually become faster in the process. Perhaps this
says more about the competence of the Java programmers on the project
rather the the JSP technology itself, but either way I don't consider it
encouraging.

What are the best scenarios Perl should be the best choice?

You have competent Perl programmers, and you aren't dependent on libraries
available in some other language but not available in Perl. And you have
management who hasn't drank the cool aid.

(Even the middle one isn't absolute. We had a project that absolutely
depended on 3rd party Java classes. It was going to take 3 months for the
multi-member Java developement team to make the full-featured version in
Java/Tomcat/Ant/JSP/J2EE/ whatever buzzword of the week. We couldn't wait
that long, so in the mean time I spent a week making a stop-gap solution in
Perl by using Inline::Java to bring the Java classes into the Perl world.
9 months after the "real" solution was due, it was actually "operational".
But it was so slow that the end users refused to migrate off my stop-gap
solution. It took another 6 months of tuning to actually get people to use
it.

Please advise. thanks!!

Be good at what you do.

Xho
 
E

Eric J. Roode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I want to ask what are the practical applications to use Perl? Perl CGI
scripts? But it can be done with ASP, JSP, and CGI is proven to be
slow. What are the best scenarios Perl should be the best choice?

ASP and JSP aren't exactly blazing speed champions, either.

In a web environment, CGI is indeed fairly slow. That's more of an
issue than Perl being slow. I once wrote a website, housed on a
single server, that could handle 4 million page hits per day; the
front-end (page generation) was entirely in OO Perl; the server was
Apache with FastCGI. And that was five years ago... perl 5.8 is
faster than perl 5.005, and hardware is of course faster nowadays.

- --
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32) - WinPT 0.7.96rc1

iD8DBQFDfG+BY96i4h5M0egRAsHIAJ0Wx10M5esKiUv6Ig4ssMmB/n/ERwCfVxC2
+WHI8XGVWYzzePH2rFyJe0E=
=oOrk
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top