ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved