In my humble defense; I made note of this on two occasions early in this thread.

I fully appreciate that, and this part of my answer was solely based on your own comments on the subject, I have absolutely no personal opinion on your mastery of regexes.

Just in case I did not explain clearly what I meant, my comment on Perl regexes was really meant to be a friendly advise to your attention with the idea that first spending a couple of weeks working on Perl regexes should probably save you more time in the longer run, on the PHP project especially, but also more generally. I sincerely hope that you did not understand it as me chastising you with something like "do your leaning work and come back once you know it", as nothing could have been further from my mindset. Again, what I said was really meant as a friendly advise, please pardon me if anything I said might have led you to think or suspect otherwise.

I have been using sed and awk and grep, etc. for more than 20 years (although I am certainly not a sed expert the way you are, but more simply a decently trained user), and I still use these utilities quite frequently (I even maintain at my company an intranet wiki with numerous recipes using these utilities), but I have been using these much less than before in the last 5 to 7 years, because I am really convinced that Perl regexes are far more powerful and that Perl one-liners or in-line longer scripts can do (almost) everything that sed can do and much more.

One final point: you might want to look at s2p (sed to Perl) and psed (and a2p, awk to Perl), I would think that they might help you do in Perl what you know how to do in sed and don't yet know how to do in Perl. In addition, looking at the code of these conversion utilities may give you some ideas for your own PHP to Perl project (even though this a much more ambitious project).


In reply to Re^5: Has anyone attempted to create a PHP to Perl converter? by Laurent_R
in thread Has anyone attempted to create a PHP to Perl converter? by taint

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.