You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
552 B
Perl

5 years ago
Type Operator Example
Scalar $$reference $ref = $name; print "$$ref";
Array @$reference $arrayRef = \@array; print "@$arrayRef";
Array scalar $$reference[index] $ref = \@digits; $nine = $$ref[9];
Array index $#$reference $ref = \@digits; $lastIndex = $#$ref;
Hash %$reference $ref = %inventory; ($item, $cost) = each %$ref;
Hash scalar $$reference $ref = %inventory; $itemCost = $$ref{'BrandX 16oz};