Re: XML::Parser errors
by Ian Boreham other posts by this author
Jul 26 2000 3:11PM messages near this date
view in the new Beta List Site
XML::Parser errors
|
RE: :Parser errors
At 12:22 25/7/00 +0100, "Sabrina Ahmed" <sabrina@[...].uk>
wrote:
> Hi all, I am trying to create simple perl files to parse my xml
> documents and am using XML::Parser. However, in the scripts i have written,
> i keep getting the same error so i am wondering if i am doing something
> fundamentally wrong. My scripts are just to parse an xml file and give the
> info as html. i am doing a web-based project to describe information about
> images and basically want the perl script to parse the xml document and
> show the relevent information in a web environment. However, even my test
> scripts aren't working. the error i get is: Global symbol "$p1" requires
> explicit package name at ./xmltest.pl line 6.
> Execution of ./xmltest.pl aborted due to compilation errors.
At this point in a question you should include the code so people have some
chance of being able to help you. Error messages out of context are rarely
useful. Don't worry. I am not trying to "make an example" of you, but this
seemed like a good opportunity to suggest this advice to question-askers in
general. If you don't give enough context, people will ignore your problem.
In this case, you probably need to put:
use vars '$p1';
at the top of your script.
Regards,
Ian
Thread:
Sabrina Ahmed
Ian Boreham
John Cope
|