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; };

In reply to Re^4: Tree::Nary n00b has questions by Amphiaraus
in thread Tree::Nary n00b has questions by Amphiaraus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.