in reply to The complicated problem

Strange as it may be, there is a web-page on translating Perl into PHP: Perl to PHP Translation.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: The complicated problem
by assemble (Friar) on Apr 02, 2008 at 17:23 UTC

    What's really sad about that site is that some of the translations are wrong. He treats PHP arrays like normal arrays--but they aren't: every array in PHP is an associative array. Then I saw this gem:

    Perl: $a = keys(%h); $b = values(%h); PHP: $a = array_keys($h); $b = array_values($h);
    The Perl will give you the counts, the PHP returns the actual values...

    And that's just the beginning of what this guy says you should do... I'm pretty sure that he doesn't know Perl, but at least it gave me something laugh about :)

      Ah, you know what they say in Italian:
      Traduttore traditore

      Translator, traitor

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        Um... Did you translate that from Italian to English? ;-)