Help for this page

Select Code to Download


  1. or download this
    my $struct = {
        hashRef => { fruit => 'apple', veggie => 'corn' },
        arrayRef => [ qw(1 2 3 4 5) ],
    };
    
  2. or download this
    #!/usr/bin/env perl5
    use strict;
    ...
    # And for the coup de grace, we'll deref $struct via ${} instead of ->
    # too.
    print ${${$struct}{hashRef}}{fruit}, "\n";
    
  3. or download this
    % ./tst.pl 
    apple
    apple
    apple
    apple