in reply to possible to assign symbolic references?
If you want names, then you are looking for a hash.
$currentTag->{class} = 'Widget'; #for exampleYou can then pass $currentTag around, or push it onto an array of children of the parent tag, or whatever you need to do.
Just say my $currentTag = {}; when you start a new tag, or my %currentTag = (); if you prefer.
Then you can do push @{$parentTag->{children}}, $currentTag; or push @{$parentTag{children}}, \%currentTag; respectively.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: possible to assign symbolic references?
by Argel (Prior) on Sep 22, 2010 at 20:08 UTC |