Help for this page

Select Code to Download


  1. or download this
    $hash{$name}{$id}= $comment;
    push @{$hash{$name}{$id}}, $comment;  #this one has been commented out
    
  2. or download this
    my %hash;
    my ($name, $id, $comment);
    ...
                  #push @{$hash{$name}{$id}}, $comment; #create an anonymo
    +us array
                                                        #in case more than
    + one $comment or other variables related to same $name/$id
                  }
    
  3. or download this
    Name1 12 firstname1 some more info
    
  4. or download this
    for my $key1(sort keys %hash){
        print "$key1\t->$hash{$key1}\t";        #$hash{$key} hash referenc
    +e,to access it dereference it.....
    ...
                print "$key2\t->$hash{$key1}{$key2}\t\n";
                }
        }
    
  5. or download this
    use strict;
    use warnings;
    ...
    Name1 12 firstname1
    Name2 55 firstname2
    Name3 20 firstname3
    
  6. or download this