[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: wml 2.0.7: ePerl printf
- From: Denis Barbier <nospam@thanx>
- Date: Tue, 31 Jul 2001 08:53:08 +0200
On Tue, Jul 31, 2001 at 08:18:15AM +0200, Karl-Heinz Marbaise wrote:
> Hi there,
>
> i just have a little problem with WML.
>
> Here little cut out of my code:
>
> my $output = $weekdays{'de'}{'short'}[$wday] . " " .
> $month{'de'}{'short'}[$mon] . " " .
> $mday . " ";
> $output = $output . sprintf ('%2d', $hour);
> print $output;
> printf STDOUT '%02d:%02d:%02d UTC %04d', $hour, $min, $sec, $year;
>
> My questions is now, why does the simple print $output
> work correctley but the printf STDOUT does only produce
> "d:d:d UTC d" in output HTML file?
> Am I not allowed to use printf in ePerl?
You are, but %0 may be expanded because it is inside a tag definition.
Then write
<protect pass=2>
printf STDOUT '%02d:%02d:%02d UTC %04d', $hour, $min, $sec, $year;
</protect>
--
Denis Barbier
WML Maintainer
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com