2009/12/6 Jigme Datse Rasku <jra...@armispiansystems.ca>: > I believe if you want to do things "much the way PHP does," probably unless > you have a significant reason to *not* use PHP (either you see another tool > as "better" or you see PHP as lacking in some respect, I don't see a reason > not to use PHP.
First, if you know PHP well and have no reason to leave it, use it. If you are productive in a given technology/language, that's a good reason as any to use it. PHP is very close to Perl in a lot of ways, but unless you have the time to learn a new language and the tools that come with it, stick with what you know. > My understanding of writing a website in Perl is that you do *not* have the > nice features of PHP in that it can be embedded within HTML with > appropriately named files. So for example in PHP you can use <? and ?> to > echo a value to the web page, where everything else you write in plain HTML, > you would (as I understand it) have to output your whole webpage via Perl, > if you were to use Perl. This being said, anything you can do in PHP is available in Perl, PHP being the "less talented brother" of Perl and all. For instance, for embedding code tags in your HTML page, look no further than some awsome and powerful Perl modules such as Template::Toolkit (www.template-toolkit.org) which gives you EXACTLY that. You might also want to look at Catalyst, (www.catalystframework.org) which is a powerful, flexible and very excellent web-framework that gives you all of what you can pull off with PHP and then some. >> I wanted to know if it is possible to use Perl instead of PHP (and I am >> pretty sure it should be possible :) ). But my main concern is what are the >> main Pros & Cons of using Perl instead of PHP. Anything you can do with PHP you can do with Perl, I'm not sure the opposite is possible. OTOH, if you are fluent with PHP but know no Perl, see above. >> So what are the main Perl modules which I need to install and any good >> tutorial link would be really appreciated. The Template::Toolkit manual: http://www.template-toolkit.org/docs/manual/index.html Tutorial: http://www.template-toolkit.org/docs/tutorial/index.html Catalyst Manual: http://search.cpan.org/dist/Catalyst-Manual/lib/Catalyst/Manual.pm Tutorial: http://search.cpan.org/dist/Catalyst-Manual/lib/Catalyst/Manual/Tutorial.pod -- Erez "The government forgets that George Orwell's 1984 was a warning, and not a blueprint" http://www.nonviolent-conflict.org/ -- http://www.whyweprotest.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/