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?



Thanks.
newbiewebSr. Software EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
newbiewebSr. Software EngineerAuthor Commented:
That is so cool.

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

Thanks!
0
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.
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.