in reply to Re: How to use Perl in HTML Template?
in thread How to use Perl in HTML Template?
Thanks Monks for reply and it's working. Now i change the file a little more and got message "Error:EVAL_PERL not set". Could you tell me how to set EVAL_PERL in template . Another issue is that when i run program B it's showing the value of random but in Program A it it not showing the Value of random A.
Program A
[% TRY %] [% PERL %] use WebService::CaptchasDotNet; my $o = WebService::CaptchasDotNet->new(secret => 'secret', username => 'demo'); my $random = $o->random; print "random=", $random; my $url = $o->url($random); print $url; [% END %] [% CATCH %] Error:[% error.info %] [% END %] <html> <title> This is Example of using perl with HTML </title> </html>
Program B
#!/usr/bin/perl use strict; use warnings; use WebService::CaptchasDotNet; my $o = WebService::CaptchasDotNet->new(secret => 'secret', username = +> 'demo'); my $random = $o->random(); print "Random value = ". $random; my $url = $o->url($random);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to use Perl in TT2??
by dsheroh (Monsignor) on Nov 03, 2009 at 11:21 UTC | |
|
Re^3: How to use Prel in HTML Template??
by Anonymous Monk on Nov 03, 2009 at 12:08 UTC |