in reply to Re: Tree::Nary n00b has questions
in thread Tree::Nary n00b has questions

Thanks all, I am very impressed by the quick responses, there's a lot of information here I can use.

On a lighter note I wonder if there are Perl T-shirts. At science fiction conventions I often see Sci-Fi T-shirts with amusing messages, like "Livin' La Vida Dorka", or "The Three Byzantine Stooges" in which the main Byzantine religious heresies are translated into Three Stooges terms. :)

Replies are listed 'Best First'.
Re^3: Tree::Nary n00b has questions
by toolic (Bishop) on Aug 25, 2008 at 15:40 UTC
    I wonder if there are Perl T-shirts
    Buy Stuff
      In case it's of interest here is my final version of my function to print the data in each of my n-ary tree nodes:

      # A) From an initializing function for nary tree nodes: # My hash variable my %node_data; # Put data in hash $node_data{"dir_name"} = "/vobs/engine_cdma2000/code/dmss/apps/MediaPl +ayer"; $node_data{"dir_vep"} = "/vobs/engine_cdma2000/code/dmss/apps/MediaPla +yer@@/main/par_x_haloc9_s74.47.9/bld_01.06.00_ca25_krmt43_haloc/1"; # Pass hash by reference to new() $root = Tree::Nary->new(\%node_data); # B) Final version of my print nary tree function: sub print_nary_dir_tree { my $tree = shift; my $printsub = sub { my $node = shift; my %hash_data; if (defined $node) { # Reference to a hash my $node_data = $node->{data}; # The hash itself %hash_data = %$node_data; if (defined $node_data) { print "hash_data dir_name holds $hash_data{dir_name}\n"; print "hash_data dir_vep holds $hash_data{dir_vep}\n"; } else { print "printsub if statement has failed\n"; } } return 0; };