in reply to Re: Re: Passing Indirect as Reference
in thread Passing Indirect as Reference

     Quote:     my $parse_it = HTML::TokeParser->new( \ ${$self->{'HTML'} } ); That code dereferences $self->{'HTML'} as a scalar reference; if $self->{'HTML'} were already a scalar reference, this whole exercise would be unnecessary. So that won't work.

     Quote:     my $parse_it = HTML::TokeParser->new( \ "$self->{HTML}" ); That works, passing a reference to a copy of $self->{HTML}, instead of to $self->{HTML} itself. That has the (probably not significant) disadvantage of allocating memory for a duplicate of $self->{HTML}, but the advantage of not having to worry about HTML::TokeParser changing the value of $self->{HTML} via the reference. That's a good suggestion.