While several of the other monks have answered your explicit questions. There's one potentially bad idea lurking in your original post.

Is it worth it to drop everything, take time to learn Perl, port that code over, and continue writing in Perl?

Is there any reason why you would need to? If code is working in PHP and you don't have an explicit need to change it, why change?

When learning a new language, it is often better to start off writing small pieces of code or tools than porting some critical (or even just working) code to the new language. Instead of a rewrite,

Often learning a new language will force you to think about your primary language (and programming) differently. Once you get comfortable with the new language, you may see places where you could do a better job in the new language than in the old one. That is the time to consider building more production code in the new language.

Several times in my career, I've seen someone come to the conclusion that a system should be re-written in a new language to improve the system. I can't think of a single time I've seen that go as planned. Often the new system turns out worse, because the programmers don't know the new language as well as they did the old one. Sometimes this ends up souring them on the new language forever.

IMNSHO, you should definitely learn Perl. If possible, you should also make use of Perl where it fits with your other goals. You should probably not rewrite a significant chunk of functionality unless you have a really good reason.

G. Wade

In reply to Re: From PHP to Perl - Should I, and how? by gwadej
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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.