Help for this page

Select Code to Download


  1. or download this
    my $ref_to_array  = \@an_array;
    my $ref_to_hash   = \%a_hash;
    my $ref_to_scalar = \$a_scalar;
    
  2. or download this
    my $ref_to_array = [1,2,3,4];
    my $ref_to_hash  = { 'key1' => 'val1', 'key2' => 'val2' };
    my $ref_to_scalar = \"some string\n";
    
  3. or download this
    print $ref_to_array->[0];
    print $ref_to_hash->{'some_key'};
    print ${$ref_to_scalar};