Help for this page

Select Code to Download


  1. or download this
    my @array = (1, 2, 3);  just an array
    
    my $ref = \@array;    get the ref to the array
    
    my $ref = [1, 2, 3];  make an anonymous array and get the ref
    
  2. or download this
    $xxx = [ @array ]; huh??? Hey I think I found out: we mke a copy of th
    +e array in an anonymous and get the ref to it.
    
  3. or download this
    @$array = (1, 2, 3);  what?!