Help for this page

Select Code to Download


  1. or download this
    no strict 'refs';
    my $point1 = 'valpt';
    @$point1 = (1,2,3);
    # symbolic reference
    print @valpt;
    
  2. or download this
    no strict 'refs';
    my $point1 = 'valpt';
    eval "\@use_$point1 = (1,2,3)";
    print @use_valpt;
    
  3. or download this
    my $point1 = 'valpt';
    my @array = (1,2,3);
    ...
    # hard reference to array stored in hash %foo
    print @{ $foo{ 'use_valpt' } };
    # dereference arrayref stored in %foo under 'use_valpt' key