Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

join all elements in array reference by hash

by johnko (Initiate)
on Dec 29, 2012 at 20:07 UTC ( #1010848=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        ...
        my @saved_verses = @verses;
        $bible{$book}{$chapter}{'verses'} = \@saved_verses;
        @verses = (); # use again for next chapter
    
  2. or download this
        my $n = 0;
        $bible{$bookname}{$chapter}{'verses'}[$n];
    ...
        join("\n\n",$bible{$bookname}{$chapter}{'verses'}[0..$#{$bible{"$b
    +ookname"}{"$chapter"}{'verses'}}]);
        join("\n\n",$bible{$bookname}{$chapter}{'verses'});
        # I get instead ARRAY(0x[0-9]*) or Argument "" isn't numeric in ar
    +ray element at ...
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1010848]
Approved by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2014-07-11 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (236 votes), past polls