in reply to indirectly accessing variable

Update: Guess I'm a little late to the party...two replies already...heh ; )

Instead of putting the values into seperate variables like that, use a hash. Then you could do:

sub writeBasicTag { my $tag = $_[0]; $writer->startTag($tag); $writer->characters($value{$tag}); $writer->endTag($tag); }

Replies are listed 'Best First'.
Re: Re: indirectly accessing variable
by santellij (Novice) on Jul 11, 2003 at 16:25 UTC
    Man, that was fast. I was going to take a break on this one now I have to write more code... :-\