[ic] IC/eBay API integration -> impending donation

Grant listbox at email.com
Tue Sep 16 13:28:26 EDT 2003


> > Usertag parsexml hasEndTag
> > Usertag parsexml Interpolate 1
> > Usertag parsexml Routine <<EOR
> >
> > sub whatever {
> >         if ($tag eq "XMLDOC_WRAPPER") {
> >                 return;
> >         }
> > }
> >
> > sub {
> >         my $tag="";
> > }
> >
> > EOR
>
> You have a variable scope problem. You're declaring a lexical "$tag"
> variable inside the main sub, which can't be seen from the sub whatever.
> You need to either declare it so it's visible from both subs, or pass the
> value from one to the other.
>
> Jon

What can I add to the code to declare $tag so it's visible from all subs?

- Grant



More information about the interchange-users mailing list