#!/usr/bin/perl -w


sub arrayprint2 {
	local($num) = shift; # get the number of items
	local(@array);       # the array to read in
	local($i);           # a local variable
	for($i = 0; $i <$num; $i++) {
		$array[$i] = shift;
	}
	for($i = 0; $i <$#array; $i++) {
		print "$i --> $array[$i]\n";
	}
}


sub arrayprint {
	local(@array);
	@array = shift;
	for($i = 0; $i <$#array; $i++) {
		print "$i --> $array[$i]\n";
	}
}



$a[0] = 1;
$a[2] = 2;
$a[3] = "three";
$a[10] = 10;
print $#a;
arrayprint(@a);
#arrayprint2($#a, @a);
