Help for this page

Select Code to Download


  1. or download this
    my @arr = (1,2,3,4);
    print "This is array: @niz\n";
    my $ref = \@niz;
    print "This is the reference: $ref\n";
    print "And this should be dereferencing or getting the value of the ar
    +ray through the reference : @{$ref}\n"; # This is same as (print "Thi
    +s is array: @niz\n";)
    
  2. or download this
    my %h = ('Ivan'=>7,
            'AK'=>8,);
    ...
    print "$refh\n";
    print "${$refh}{'Ivan'}\n";
    print "$refh->{'Pero'}\n";
    
  3. or download this
    my $sales = {
    monday => { jim => [ 2 ], mary => [ 1, 3, 7 ] },
    ...
        $total += $_;
    }
    print "Jim made $num_sales sales on Tuesday and earned \$$total commis
    +sion\n";