Why dont you just define the function outside and call them from inside 
your master function

Bernd Prager wrote:
> Hi,
> 
> I run into a problem and would appreciate some help.
> 
> I'd like to write a subroutine that parses an XML file.
> I use XML::Parse and one way that works is to define
> subroutines with the name of an XML tag and every appearance
> of that tag calls the appropriate subroutine.
> 
> Since I want to have this procedure entirely encapsulated in 
> my funtion I end up defining nested subroutines:
> 
> sub myParse {
>    my $content;
>    
>    sub myXMLtag {
>       (... do something with $content...)
>    }
> 
> }
> 
> Now I'm getting error messages "Variable "$content" will not stay shared".
> 
> I read something about anonymous functions to prevend this error but
> I can't do that here since XML::Parse requires the function names
> the same as the XML tags.
> 
> Thanks for help,
> -- Bernd
> 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to