in reply to Re^3: XML::Parser - Code Reference Error?
in thread XML::Parser - Code Reference Error?
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];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: XML::Parser - Code Reference Error?
by spurperl (Priest) on Jun 10, 2005 at 06:25 UTC | |
|
Re^5: XML::Parser - Code Reference Error?
by holli (Abbot) on Jun 10, 2005 at 07:22 UTC |