- or download this
sub add_line {
my ($tree,@line) = @_;
...
$tree = [ $first_element, @line ];
}
}
- or download this
sub get_elements {
my ($tree,@folder_names) = @_;
...
my $subtree = $tree->{shift(@folder_names)};
return get_elements($subtree,@folder_names);
}
- or download this
$directories{ join("/",@folder_names } = \@fields;
my @fields = @{ $directory{ join("/",@folder_names) } };