#!perl #Stupid test program demonstrating array looping in perl #due to a question in a class. #http://rm.vg/ @list = array; $min = 1; $max = 8; $temp = 1; for($i = $min; $i <= $max; ++$i, $temp = $temp << 1) { $list[$i] = $temp; } print('Note that the array is ' . $max . ' elements long.' . "\n"); $max += 2; for($i = $max * -1; $i < $max; ++$i) { print($i . "=" . $list[$i]); print("\n"); }