best scenarios of using Perl

Discussion in 'Perl Misc' started by Joe, Nov 13, 2005.

  1. Joe

    Joe Guest

    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!!
     
    Joe, Nov 13, 2005
    #1
    1. Advertising

  2. Joe wrote:

    > 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
     
    Gregory Toomey, Nov 13, 2005
    #2
    1. Advertising

  3. Joe

    Guest

    Joe wrote:
    > 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.
     
    , Nov 13, 2005
    #3
  4. 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
     
    Joachim Pense, Nov 13, 2005
    #4
  5. Joe

    Juha Laiho Guest

    "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.
    --
    Wolf a.k.a. Juha Laiho Espoo, Finland
    (GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
    PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
    "...cancel my subscription to the resurrection!" (Jim Morrison)
     
    Juha Laiho, Nov 13, 2005
    #5
  6. Joe

    Guest

    "Joe" <> wrote:
    > 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

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Nov 13, 2005
    #6
  7. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    "Joe" <> wrote in
    news::

    > 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-----
     
    Eric J. Roode, Nov 17, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff
    Replies:
    0
    Views:
    313
  2. Michael Herman \(Parallelspace\)
    Replies:
    5
    Views:
    3,064
    Juan T. Llibre
    Jul 5, 2005
  3. mandy
    Replies:
    8
    Views:
    732
    Andrew McDonagh
    Mar 25, 2006
  4. earthwormgaz

    class data usage scenarios

    earthwormgaz, Sep 26, 2006, in forum: C++
    Replies:
    3
    Views:
    352
    Daniel T.
    Sep 26, 2006
  5. John Oksz
    Replies:
    0
    Views:
    362
    John Oksz
    Apr 12, 2012
Loading...

Share This Page