Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

1) As stated above, it's not about what you do, it's about how you do it, and Perl is all about "Easy things are easy, difficult things are possible." As far as advantages over PHP, you'll find a great friend in CPAN, which holds solutions to 99.9% of common problems and a shocking number of obscure ones too.

PHP's benefit is "super easy deployment." It's practically married to MySQL, almost all shared hosting has it, you can start writing a database driven web application very quickly.

Perl is a little harder, as less shared hosts have it, but you are rewarded for your efforts with more power under the hood. For example, PHP has deep MySQL integration, but with CPAN modules and Perl you can easily interface with almost any way of storing data imaginable.

Speaking of data, a good example of power delivered easily is DBM::Deep, which you can find on CPAN. It seamlessly ties your data structures to a very fast flat file database that supports transactions. It has found a home in many of my projects I would have used something more complicated for in the past. See also the modules for easily parsing CSV, XML, and other common formats (aren't all our lives better when we never have to write code to parse CSV again?)

2) Also as stated above, you can write a GUI application with Perl, but it really isn't Perl's strength. I often end up doing all of the messy stuff in Perl (data extraction, analysis, output) and the visualization in something else. Your mileage may vary.

Edit: Everybody is mentioning CPAN as the magic (and it is magic), but the Perl language brings you a lot of power itself. You said that Perl syntax looked a lot like PHP to you, and it is true you can code Perl in much the same way as you do PHP (or C, or ...). Perl gives you many options as to how to code. As you learn more Perl, though, you'll start to pick up some very powerful Perl idioms and Perl ways of doing complicated tasks with very little code. Take a look at some of the solutions posted by the veterans here in Seekers of Perl Wisdom for examples.

In reply to Re: Just starting Perl by amarquis
in thread Just starting Perl by spearfish

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2022-10-05 03:14 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (20 votes). Check out past polls.