in reply to PHP to PERL ?

And I quote from that other page:

"Sometimes, a module just isn't logical. For example, when you want to use an external configuration file... This is where do comes in."

Part of what he wants to do sounds like including a table definition, which would be config, not code.

Incidently, there are a number of things which are far less painful to do in Perl than PHP. For instance, sorts of nested structures, or regex. Anything involving a lot of data processing is much faster to code in Perl. I generally use PHP for less complicated functions, and Perl for admin stuff.

Replies are listed 'Best First'.
Re^2: PHP to PERL ?
by runrig (Abbot) on Dec 28, 2005 at 23:55 UTC
    Part of what he wants to do sounds like including a table definition, which would be config, not code.

    I got the impression that he mostly wanted to include text/html and some external code (e.g. functions). I saw the part about using do for config purposes in that other page that I linked to, which is why I said "in general" don't use it. I assumed that if he read the node that he'd get the idea. I've seen do abused too many times (post perl 4) to just say "here's how do works, go ahead and use it!" It's better to give context and better alternatives when possible.