On Wednesday 16 Dec 2009 10:10:24 Avani wrote:
> Hi all,
> 
> I am very new to perl. I have to parse template in perl.
> 
> do anybody have any reference code to do it?
> 
> currently I am using regular expression. Right now, i m only able to
> replace variables. HOw to do it for "for loop" and "if conditions" ?
> 
> pls help me.
>

There are already several high-quality templating systems for Perl - please 
don't create your own custom one:

* http://search.cpan.org/dist/Text-Template/ - basically just embedded Perl.

* http://search.cpan.org/dist/HTML-Template/ - more powerful than T-T but 
quite quirky.

* http://template-toolkit.org/ - very powerful and my personal favourite.

There are many others, but these are the most popular ones. Please use one of 
those. Also see:

http://www.shlomifish.org/humour/fortunes/sharp-perl.html#many-types-of-wheels

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Best Introductory Programming Language - http://shlom.in/intro-lang

Bzr is slower than Subversion in combination with Sourceforge. 
( By: http://dazjorz.com/ )

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to