Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

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

Okay, gentlepeople, let’s try to seriously answer this poor bloke’s question.   (After all, (s)he has finally seen the light!)

In the PHP language, “everything but the kitchen sink” is built in to the PHP executable at compile-time ... so the executable is “big and phat, but self-contained.”   Per contra, in the Perl environment, the executable is relatively small.   (On my computer right now, for example, /usr/bin/php is 32.2 megabytes, whereas /usr/bin/perl weighs in a svelte 86K.)  

So, where does the needed functionality come from?   From external modules, such as this one:   Net::Curl.   Start by clicking on this examples-link ... Net::Curl::examples.   Most of what you see here should seem very familiar.

As the case may be, you might find that this module is already installed, or you might have to install it.   That’s fine:   if you need it, you can install it ... not megabytes of kitchen-sink that you don’t.

If you do as suggested and search for Curl at http://search.cpan.org, you’ll find 181 modules that support Curl.   But, can we do better than that?   Yes, we can.   Search for what you want to achieve... PayPal (130 hits), or PayFlowPro (7 hits).

This is the most-significant difference between the PHP approach and the Perl approach:   the kernel of Perl is almost microscopic by comparison, but the scope of the CPAN library is vast:   90,429 Uploads; 27,446 Distributions; 120,905 Modules; 10,605 Uploaders as of today.   And these are often very specific ... very close to where you actually want to be, such as (say...) Business:PayPal::API.   Instead of trying to figure out, “how do I write this?” ... you instead start with, “I presume that I don’t have to write this at all, because somebody out there most likely already did.”

PHP.   Perl.   (And all the rest ...)   Different tools, all good, and all very different.   Nearly all of us, use all of them, all the time, but ... Come closer, and check out this world called Perl.   Come see what all the fuss is about.   See for yourself why so many of us return to this tool again and again.


In reply to Re: Code from PHP to Perl by sundialsvc4
in thread Code from PHP to Perl by remya

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (11)
    As of 2014-09-18 21:32 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (124 votes), past polls