J
jdamon
Hi,
I'm trying to create a self referential datastructure in one line.
An example is :
my %tree;
%tree = (
root => {
parent1 => {
child => {
data => "foo",
root => $tree{root} # or even \%{$tree{root}}
}
}
}
);
The problem is that the reference doesn't exist at the time that the
structure is created.
If you are going to post back to this , I DON'T want the solution when
you build this up iteratively. I just want to know if it can be done
in a declaration like stated above.
I'm trying to create a self referential datastructure in one line.
An example is :
my %tree;
%tree = (
root => {
parent1 => {
child => {
data => "foo",
root => $tree{root} # or even \%{$tree{root}}
}
}
}
);
The problem is that the reference doesn't exist at the time that the
structure is created.
If you are going to post back to this , I DON'T want the solution when
you build this up iteratively. I just want to know if it can be done
in a declaration like stated above.