So I'm taking the array reference created by $parse->parse($address) and storing it in $tmp. Then I'm trying to print from the array reference but I get an error saying that $tmp isn't an array refernce.#!/usr/local/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser); use XML::Parser; use CGI; use Data::Dumper; my $q = CGI->new(); print $q->header(); my $parse = new XML::Parser(Style => 'Objects'); my $address = "<LOC><HNO></HNO><STN>Eagle Way</STN><MCN>Gotham City</M +CN></LOC>"; my $tmp = $parse->parse($address); print $tmp->[0][1];
In reply to Re^4: XML::Parser - Code Reference Error?
by awohld
in thread XML::Parser - Code Reference Error?
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |