Help for this page

Select Code to Download


  1. or download this
    @list_of_refs=map { +{ $_ => 1 } } 1..10;
    @list_of_refs=map { my %hash=($_=>1); \%hash } 1..10;
    ...
      print @$foo;
      print @$ref;
    }
    
  2. or download this
    my $ref_to_anon={ a=>1 };
    my %named=(a=>1);
    my $ref_to_named=\%named;
    # realistically there is no way to tell which ref is to an anonymous a
    +rray