in reply to indirectly accessing variable
There are all sorts of articles around about why it's a bad idea to access variables by name through other variables.my %xml_values = (); $xml_values{year} = '1999'; sub writeBasicTag { my $tag = $_[0]; $writer->startTag($tag); $writer->characters($xml_values{$tag}); $writer->endTag($tag); }
|
|---|