in reply to Re: Re: Variable scope with XML::Parser
in thread Variable scope with XML::Parser
andmy $p = new XML::Parser (Handlers => {Start => sub{hdl_start($tag, $na +me, @_)}, ...
What I use here is an anonymous subroutine as the handler, and I've changed the hdl_start subroutine to change it's two first parameters ($_[0] and $_[1]).sub hdl_start { $_[0] = $_[2]; $_[1] = $_[3]; }
|
|---|