Perl References/Dereferences
An enumerated or comma-separated list always returns the last element in a scalar context. An array reference is created by either: * the [ ] operator around a list * the operator in front of a list variable (@) A hash reference is created by either: * the { } operator around a list (of pairs) * the operator in front of a hash variable (%) Example Code: ############################################################# references.pl #!/usr/bin/perl -w use strict; use Data::Dumper; my @a = qw( hello there you guys ); # a regular array my %grade = qw( A 4.0 B 3.1 C 2.0 D […]
Read more