#!/usr/bin/perl -w

# 
# Making a normal array 
#
$b[0]= 7;
$b[1] = 9;
$b[2] = "fred";
$b[3] = 17;
$b[4] = "fred";
$b[5] = -4.321;
for($i = 0; $i <= $#b; $i++) 
{
	print "\$b[$i] = $b[$i]\n";
}
print "\n\n\n\n";

#
# Copy an array from one to another
#
@new = @b;



#
# Making an associative array
#
$age{"andy"} = 33;
$age{"dan"} = 21;
$name = "scott";
$age{$name} = 25;
for $i (sort keys %age) 
{
	print "$i is $age{$i} years old\n";
}
print "\n\n\n\n";





$a[0] = 1;
print "Allocated one element\n";
$a[10000000] = 2;
print "Allocated another\n";
print "Length of array is " . length(@a) . "\n";
