Google Answers Logo
View Question
 
Q: Are you a PERL WIZARD? IS PERL THE RIGHT LANGUAGE FOR ME TO LEARN? ( Answered,   0 Comments )
Question  
Subject: Are you a PERL WIZARD? IS PERL THE RIGHT LANGUAGE FOR ME TO LEARN?
Category: Computers > Programming
Asked by: ystore-ga
List Price: $15.00
Posted: 20 May 2003 01:17 PDT
Expires: 19 Jun 2003 01:17 PDT
Question ID: 206218
Are you a PERL WIZARD? IS PERL THE RIGHT LANGUAGE FOR ME TO LEARN? I'm
in ecommerce for small business folks developing Yahoo Stores which
means all of the infrastructure is taken care of by Yahoo.

I'm not necessarily interested in the CGI-bin aspects of PERL, but I
like the idea of being able to spot check Yahoo Servers to see if they
are up and running, spider/scrape content off manufacturer sites, etc.

I do a lot of batch processing of anywhere from 50 to 15,000 database
records (of products) to create Yahoo! Stores. I'll take data from XML
to CSV into EXCEL into NOTEPAD into WORD and back into to EXCEL to
add/remove formatting, strip html, etc.

I write batch programs to rename 1000 of product images the "correct"
ID.

I have to globally find and replace characters across pretty big
databases.

I'd also like to be able to maintain large databases of keywords and
their conversion rates for multiple retail stores.

Can I do all of this with PERL? I got the CAMEL & the LLAMA books (and
a newt? and one other) from AMAZON last week and started to poke
around this weekend.

HELP!
Answer  
Subject: Re: Are you a PERL WIZARD? IS PERL THE RIGHT LANGUAGE FOR ME TO LEARN?
Answered By: hailstorm-ga on 20 May 2003 02:16 PDT
 
ystore,

Perl (generally spelled with only the first letter capitalized, though
thought by some to be an acronym for Practical Extracting and
Reporting Language) is the friend of millions of programmers around
the world.  There are languages with better structure, languages that
compile faster, and languages that just plain make more sense.  But
where Perl really stands out is its flexibility, a feature that allows
you to do things several orders of magnitudes faster than other
languages.  In my personal experience, I have been able to do things
with Perl in mere hours that would have taken me several days or even
weeks to do any other way.

The Camel Book's (Programming Perl by Larry Wall, Tom Christtiansen &
Randal L. Schwartz) Preface does a great job of summing up the strong
points of Perl, a portion of which I will quote here: "In a nutshell,
Perl is designed to make the easy jobs easy, without making the hard
jobs impossible.  And what are these 'easy jobs' that ought to be
easy?  The ones you do every day, of course.  You want a language that
makes it easy to manipulate numbers and text, files and directories,
computers and networks, and especially programs.  It should be easy to
run external programs and scan their output for interesting tidbits. 
It should be easy to send those same tidbits off to other programs
that can do special things with them.  It should be easy to develop,
modify, and debug your own programs too.  And, of course, it should be
easy to compile and run your programs, and do it portably, on any
modern operating system.  Perl does all that, and a whole lot more."

Whether you are using Windows, Linux, Macintosh, UNIX, even other
esoteric operating systems like BeOS and OS/2 Warp, you can run Perl,
and in most cases compile the same code you write on one system
directly on another.  In most cases, the things you want to do in Perl
have already been mostly done for you, thanks to the extensive code
libraries available in the Comprehensive Perl Archive Network (CPAN)

Perl particularly excels in manipulating data, with extremely powerful
regular expression and text management functionality.  As a practical
example, a global search and replace over an entire filesystem can be
done with a single line of text, combining UNIX and Perl to replace,
for example, every occurance of a web domain throughout an HTML site:

find -name *.html | xargs perl -pi -e
's/cvs.oldserver.com/cvs.newserver.org/g'

The Camel and the Llama (Learning Perl) books are a great start for
learning the fundamentals.  You will also want to research the CPAN
site in great detail.  Once you learn the basics, the possibilities
for using Perl will be limited only by your imagination.

In closing, to quote once more from the Camel, "Perl is a language for
getting your job done."  If you do any serious work with computers, no
amount of time studying and working with Perl could ever be considered
wasted.

Sites Cited:
  CPAN
  http://www.cpan.org/

  Global Search and Replace With Perl:
  http://hacks.oreilly.com/pub/h/73

Google Search Strategy:
  perl xargs global search replace
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy