Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Yes, you should learn Perl, for the same reason you should add any language to your toolkit. It gets easier to clearly express your intent in code as you learn the idioms common across different languages. You also get an idea for what concepts are easier to express in a particular language, which will give you whole new ideas for how to organize a project. I initially learned Perl because of how much easier it was to express regular expressions compared to PHP, and those regular expressions changed how I looked at text manipulation for a very long time indeed. Once I got the hang for coding in Perl, everything including GUI and Web development became much easier and definitely more powerful for me than in PHP. Your mileage may vary, of course.

You don't lose anything by using Perl instead of PHP, but fewer libraries are effectively built-in to the language. Database handling and a bewildering assortment of Web-specific features are available via external libraries on CPAN.

Now on to your specific questions:

  1. It depends on the modules and how much you want to know right now. While you're getting started, use <Module> is all you need to know. Later you'll mess with export lists and so forth. Generally speaking, installation and updating of modules is handled via the cpan shell. cpan install <module> and cpan upgrade will do all of the dirty work while you sip your coffee and answer emails. ppm is available if you are using ActivePerl, and it follows a similar usage pattern.
  2. Look at Tutorials, and in particular Including files. Also check out perlmod when you're curious to look at the gory details.
  3. Sure, but they tend to vary from one user to the next. My gotcha was learning that I didn't have to learn every bit of Perl to start writing useful code. Start simple and improve your code with new idioms as you learn them. Also, the greatest way to answer most questions is TIAS: Try It And See. Like PHP, Perl encourages experimentation.

Go ahead and learn Perl. It's always worth your time to expand your knowledge.


In reply to Re: From PHP to Perl - Should I, and how? by webfiend
in thread From PHP to Perl - Should I, and how? by salazar

Title:
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 How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-19 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found