Thread Hash to Class-Attributes (21 answers)
Opened by Kuerbis at 2016-01-06 09:57

Gast janus
 2016-01-12 11:25
#183482 #183482
Merge Hashes in Perl5:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# allgemein
   %res = (%ha, %hb, %hc);

# praktisches Beispiel
# in Methoden Werte vorbelegen
sub new{
    my $class = shift;
    my %cfg = (
        host    => '',        
        port    => 80,
        http    => '1.0', 
        timeout => 10,
    @_);

   ...
}


Merge Hashes in Perl6?
Last edited: 2016-01-12 12:44:50 +0100 (CET)

View full thread Hash to Class-Attributes