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)
In reply to Re: Perl and XML
by jeffa
in thread Perl and XML
by BzBeauty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |