• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 91
  • Last Modified:

Example of how Perl can be used to process an array of data.

I have no experience with Perl and suspect it may be the best choice of technology for a financial analysis and reporting website I am making. I expect to allow users to upload PDF's or CSV files to my website, which my site will then parse, summarize and generate new reports.

There will be times when my logic needs to access published national standards tables for a specific record with names like:

CPS Retail 2 Max (Developing Markets only)
CPS Retail Key Entered

from a list of thousands of items

So, this is the reason I suspect Perl is a good choice.

Can someone please confirm that and show me why Perl is so good for pattern matching?

Is it a front end or a back end technology? What other technologies often work well with Perl? It is compiled? Or is it a script?

  • 2
1 Solution
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
1) Yes. PERL is great for this.

Use http://search.cpan.org/~hmbrand/Text-CSV_XS-1.34/CSV_XS.pm to parse your .csv files.

Now for .pdf file parsing. Hands down the best tool for this is pdftotext in the Poppler Utilities which ships which all sensible Distros package.

My strong suggestion is use Ubuntu latest as your target OS, if you're looking for fast setup.

If you'd like to wrestle with outdated Kernels + a package manager which will keep you pulling your hair out, use RedHat/Fedora/CentOS.

On Ubuntu, you can install the two packages your require as follows...

apt-get install poppler-utils libtext-csv-xs-perl

Open in new window

Which will install both packages + all their dependencies.

2) Why is PERL such a good pattern matching language.

Wow... You can Google this. PERL was originally written to replace awk + sed pattern matching with a more expressive + easier to work with syntax.

So pattern matching is the roots of PERL.

3) PERL is interpreted, not compiled. It can be used for frontend or backend coding.
newbiewebSr. Software EngineerAuthor Commented:
That is so cool.

I worked with both awk + sed ages ago to do things fast on SCO UNIX.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Hum... I realize likely best to expand on what backend might mean.

If you're referring to writing server side scripts (non-front facing, non-Web), then PERL is your tool.

If you're trying to use something like mod_perl2 + hand roll your own CMS, I'd suggest you stick with WordPress, as trying to roll your own PERL front facing CMS will require a fair bit of knowledge about session management.

Also hand rolling a CMS, will require you running a dedicated server + doing your own admin, including installing + maybe building mod_perl from source.

With Ubuntu, you can install mod_perl via...

apt-get install libapache2-mod-perl2

Open in new window

And you'll still have a very long road ahead of you getting mod_perl to work as you expect.

I run a high speed, high traffic, WordPress private hosting service.

Almost every day I write PERL code so solve server side issues of one form or another.

I also write many PERL scripts called from WordPress plugins + front end code to handing data crunching.

For front end user interfacing, I stick WordPress, so I can avoid the entire session management issue.

Also with WordPress, I can setup + deliver a site to a client in a few minutes, which delivers 1,000,000+ requests/minute.

Sigh... If I had to do this in PERL, I'd have to duplicate 1000s of lines of WordPress code. I'd rather just use WordPress of front ends.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now