-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
Here's my first post on this list :)
For fun, I did a small TODO file in XML and then im attempting to, err, read from it via XML::Simple (and XML::Parser).
the docs in XML::Simple says that it is possible to reach objects in such a way: print $foo->{ bar }->{ baz }->[1];
The assumption I made is that 'bar' and 'baz' meant different 'structures' inside the XML file.
I would love to do just that :)
But things seems not so clever, so I get something like: none>perl test-xml.pl Pseudo-hashes are deprecated at test-xml.pl line 10. Out of memory during "large" request for 1073745920 bytes, total sbrk() is 2957312 bytes at test-xml.pl line 10.
Perhaps the latter error message is void, simply because my system limits (FreeBSD) are wrongly tuned.. However, the pseudo-hashes thingie is quite a medium-pita for my humble knowledge :)
Is their a relative explanation for this behavior ?
Moreover, if I do the DUmper($thingie) shrub, its works and gives back the structure I wants.
Here's the 'whole' source of it: #!/usr/bin/perl -w use strict;
use XML::Simple qw(:strict); use Data::Dumper;
my $xml_file = '/home/erob/dev/perl/TODO.pietra.xml';
my $in = XMLin( $xml_file, ForceArray => 1, KeyAttr => [ ], ); print $in->{ require }->{ item }->[1];
#print Dumper($in); 1;
some more snippets of schwig: perl --version: none>perl --version
This is perl, v5.8.2 built for i386-freebsd
Copyright 1987-2003, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page.
p.s
Btw, I DO love perl5 very much. For me, it's (perl) very much like a soup (err, is that self, or is that my visual representation is so sluggish that I need some kind of visual paradigm for it .)
I was wondering how perl6 would be, since it can't() be soup-like ?
Thanks and happy perlesh (pronounced something like 'eash') :)
erob -----BEGIN PGP SIGNATURE----- Comment: quork teht!
iD8DBQFAredlfhO/J4JSDfYRAq6yAJ4kPymzkbKRAl3tjPTO6DXBzuLYZACeNupa E1NmW3s7iJnQCkEqtWZzCQ8= =VOvA -----END PGP SIGNATURE-----
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>