Thanks for your prompt response and patience/wisdom. I didn't expect so many quick and detailed responses during the Christmas season. I've broken down my exceedingly long 300 lines or so into several subroutines to make for better readability.
I found the answer to my memory problems - "make an anonymous copy" via a post from Randal Shwartz. At: http://www.stonehenge.com/merlyn/UnixReview/col30.html. I basically needed to put [] around my @verses array so that I create a copy of it when I point my hash reference there.
In terms of the foreach stylistic point (@{$bible...), that was sort of the syntax I was looking for for my join, but my issue had been that I had an empty array. Would not the following be even cleaner? Comments on efficiency?
That seems to be working for me now. I may have future questions regarding my little project but now I have some experience regarding "too little" and "too much" so I'll try to ensure I follow your advice of making it "just right" and using <readmore> as appropriate.print join("\n\n",@{$bible{$qbook}{$chapter}{'verses'}});
In reply to Re^6: join all elements in array reference by hash
by johnko
in thread join all elements in array reference by hash
by johnko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |