Re: [Templates] Handling array reference

2012-04-09 Thread Rajesh Saha
Hi All, Got the solution .. [% FOREACH key IN hash.keys %] [% key %] [% ":" %][% hash.$key.0 %][% hash.$key.1 %] [% END %] Regards, Rajesh On Tue, Apr 10, 2012 at 11:56 AM, Rajesh Saha wrote: > Hi > > *I have a perl script like this:* > > #!/usr/bin/perl > use

Re: [Templates] Handling array in template

2012-04-09 Thread Rajesh Saha
pi, > > Bangkok 10240 Thailand Tel: 0-2184-6935, Fax: 02-184-6938 > Website: http://www.ibiz.co.th, http://www.sitepackage.com > > ** ** > > *From:* templates-boun...@template-toolkit.org [mailto: > templates-boun...@template-toolkit.org] *On Behalf Of *Rajesh Saha > *Sent:* M

[Templates] Handling array in template

2012-04-09 Thread Rajesh Saha
Hi *I want my result to be like this :* abc,def *What I have done (in test.tt template file):* [% FOREACH var IN vars %] [%- var -%][%- "," -%] [% END %] *I have processed the above test.tt through perl file like this:* #!/usr/bin/perl use Template ; $tt = Template->new(); $file = "test.tt" ;

Re: [Templates] remove space with backspace

2009-10-27 Thread Rajesh Saha
Sorry, attachment was missing on earlier mail. Here it's. Regards, Rajesh On Wed, Oct 28, 2009 at 6:57 AM, Rajesh Saha wrote: > Hello, > > PFA one testcase, includes one .pl file & the other one- template. > > Here, my problem is that I can't remove the white s

Re: [Templates] remove space with backspace

2009-10-27 Thread Rajesh Saha
ng". Perl version: 5.8.8 Template version: 2.20 BR, Rajesh On Tue, Oct 27, 2009 at 7:47 PM, Dave Cross wrote: > 2009/10/27 Rajesh Saha : > > Hi, > > > > Actually, in my output, I am getting some spaces, which I didn't wanted > to > > be. At the same time, I co

Re: [Templates] remove space with backspace

2009-10-27 Thread Rajesh Saha
still the same o/p. Regards, Rajesh On Tue, Oct 27, 2009 at 7:30 PM, Dave Cross wrote: > 2009/10/27 Rajesh Saha : > > Is there any way to remove some space with backspace in PTT ? > > Rajesh, > > I'm afraid I'm not really clear what you're asking. Can you

[Templates] remove space with backspace

2009-10-27 Thread Rajesh Saha
Is there any way to remove some space with backspace in PTT ? Thanks n regards Rajesh Saha ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates

[Templates] formatting

2009-10-23 Thread Rajesh Saha
Hi All, Currently, I have a formatting like this : [% format1 = format('%-15s %s') %] But, during code upgradation, my requirement is that the above "15" is saved in a variable, say var1. How to change the formatting , accommodating the variable ? thnx n rgds rajesh _

[Templates] Getting String length

2009-10-23 Thread Rajesh Saha
Hi All, How can I get the string length in PTT ? For example, the string length of "boy" is 3, the string length of "girl" is 4 & the string length of "Good boy" is 8. Thanks n regards Rajesh Saha ___ templat