in reply to Perl and XML
You also have to make sure that the CGI file is executable by everyone ... "chmod 755 foo.cgi" should do the trick if you have command line access.use strict; use XML::Simple; use CGI qw(header); print header('text/plain'); my $xs1 = XML::Simple->new(); my $doc = $xs1->XMLin('files/camelids.xml'); foreach my $key (keys (%{$doc->{species}})){ print $doc->{species}->{$key}->{'common-name'} . " ($key) "; print $doc->{species}->{$key}->{conservation}->{status} . "\n"; }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl and XML
by BzBeauty (Sexton) on Mar 16, 2004 at 23:19 UTC |