[ic] IC tag in UserTag
Grant
listbox at email.com
Sun Oct 5 14:14:04 EDT 2003
> > > > > I need to include the time tag in a block of XML in a UserTag.
> > > > How can I
> > > > > write this in Perl inside a UserTag:
> > > > >
> > > > > <LastModifiedTime>[time gmt="1" adjust="-1"]%Y-%m-%d
> > > > > %H:%M:%S[/time]</LastModifiedTime>
> > > >
> > > > $Tag->time({gmt => 1, adjust => -1, body => '%Y-%m-%d %H:%M:%S'});
> > > >
> > > > Ciao
> > > > Racke
> > >
> > > Stephen and Ed -
> > >
> > > Using either of the methods you guys suggested, I get this:
> > >
> > > Vend::Tags=HASH(0x95510f0)->time( { gmt => '1', adjust =>
> '-1' } '%Y-%m-%d
> > > %H:%M:%S' )
> > >
> > > Who's got the cure?
> >
> >I think your problem is that function calls are not interpolated within
> >strings.
> >
> >Bye
> > Racke
>
> In other words, you first need to assign the result of the
> evaluation to a
> variable:
>
> my $time = Tag->time( { gmt => '1', adjust => '-1' }, '%Y-%m-%d
> %H:%M:%S' );
> my $xml = <<EOXML;
> <LastModifiedTime>$time</LastModifiedTime>
> EOXML
>
> ...or something similar.
>
> - Ed L.
Perfect, thanks guys!
- Grant
More information about the interchange-users
mailing list