"Jenda Krynicky" schreef:
> I see. Well I'd probably get a little lost in all those braces for a
> second so
>
> map {
> $gen->user( {id => $ref->{$_}}, $_)
> } keys %{$ref}
>
> would probably be better.
You could write that as:
map $gen->user( { id => $ref->{$_} }, $_ ), keys %$re
From: Rob Dixon <[EMAIL PROTECTED]>
> Jenda Krynicky wrote:
> > From: Rob Dixon <[EMAIL PROTECTED]>
> >> Well yes, of course that's possible. But you're advocating abandoning
> >> strictures and writing unintelligible code by proposing it.
> >
> > Beg your pardon? use strict doesn't
Jenda Krynicky wrote:
From: Rob Dixon <[EMAIL PROTECTED]>
Jenda Krynicky wrote:
It's just a matter of one map():
#!perl
use XML::Generator;
$ref = {
'dermot' => '10',
'joe' => '17',
'rose' => '11',
'phil' => '13',
'brian' => '20',
From: Rob Dixon <[EMAIL PROTECTED]>
> Jenda Krynicky wrote:
> > It's just a matter of one map():
> >
> > #!perl
> > use XML::Generator;
> >
> > $ref = {
> > 'dermot' => '10',
> > 'joe' => '17',
> > 'rose' => '11',
> > 'phil' => '13',
> > 'brian' => '20',
> >
Jenda Krynicky wrote:
From: Rob Dixon <[EMAIL PROTECTED]>
I am unfamiliar with XML::Generator, but have experimented with it for
the purposes of your question and it seems to be essentially a translator
that will convert a Perl fragment into an XML fragment, and I can see no
way to modify existi
On 23 Oct 2007 at 16:46, Jenda Krynicky wrote:
> From: "Beginner" <[EMAIL PROTECTED]>
> > On a more general point I haven't found it easy to find modules
> that
> > output XML or perhaps I should say, I didn't find the ones I did
> look
> > at to be well documented in terms of examples or show t
From: "Beginner" <[EMAIL PROTECTED]>
> On a more general point I haven't found it easy to find modules that
> output XML or perhaps I should say, I didn't find the ones I did look
> at to be well documented in terms of examples or show the variety of
> different ways data structures can be repre
On 23 Oct 2007 at 14:21, Jenda Krynicky wrote:
> From: Rob Dixon <[EMAIL PROTECTED]>
> > I am unfamiliar with XML::Generator, but have experimented with it
> for
> > the purposes of your question and it seems to be essentially a
> translator
> > that will convert a Perl fragment into an XML fragme
From: Rob Dixon <[EMAIL PROTECTED]>
> I am unfamiliar with XML::Generator, but have experimented with it for
> the purposes of your question and it seems to be essentially a translator
> that will convert a Perl fragment into an XML fragment, and I can see no
> way to modify existing XML. Because o
Beginner wrote:
I have been trying to output XML that looks like this:
dermot
joe
...
I have tried XML::Simple and XML::Generator but keep hitting the same
problem when it comes to separating the id attribute and the value
from my hash reference.
$VAR1 = {
'der
On 23 Oct 2007 at 12:12, Rob Coops wrote:
> foreach my $k (keys %{$ref}) {
> $xml = $gen->users( # $xml gets over written with every new
> key So instead of doing that I would try $xml .= (appending)
> $gen->username({ id => $ref->{$k}},$k),
>
foreach my $k (keys %{$ref}) {
$xml = $gen->users( # $xml gets over written with every new
key So instead of doing that I would try $xml .= (appending)
$gen->username({ id => $ref->{$k}},$k),
);
}
On 10/23/07, Beginner <[EMAIL
12 matches
Mail list logo