http://qs1969.pair.com?node_id=137275


in reply to Efficient code to auto-generate web pages

`perldoc perldsc`
  • Comment on Re: Efficient code to auto-generate web pages

Replies are listed 'Best First'.
Re: Re: Efficient code to auto-generate web pages
by Anonymous Monk on Jan 09, 2002 at 02:22 UTC
    Thanks for your response. I realize that a data structure such as a LoH might help, but as a relatively inexperienced perl hacker, I was hoping for something a little more concrete. Mind you, I don't need this coded for me, but a bit more direction would help.
      References quick reference might be helpful in figuring out how to get ideas down into code.

      A concrete idea is that your long list of hashes should all be one hash of hashes. That reduces the insert lines down to something like:

      my $base = substr($grp, 0, 3); if (exists $is_hierarchy{$base}) { $dsc{$base}{$grp} = $dsc; $title = "$base$ng"; } else { $dsc{other}{$grp} = $dsc; }
      (And then the information about all of the different hierarchies you have has to be popualted in a hash %is_hierarchy.)