in reply to indirectly accessing variable
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 |