Scripting >> Perl >> How to initialize array and hash references




# following creates an array reference $aref  
$aref = [ 1, "foo", undef, 13 ];   

# following creates arrah @buf with zero elements
@buf = ();
 
# following creates a hash reference $href
$href = { APR => 4, AUG => 8 };