for further reading...the last bit...the foreach loop within the named sub print_array is a closure. the effect of a closure is that it remembers values inside of a un-named sub. i.e the print statement remembers the value of $_ at the time the sub was declared. using a trick, assigning an un-named sub to a glob name allows you to generate functions and function names in a loop. you'd need to read up on it some more...as so do I. btw the & is not needed in &print_array($array_reference) as far as i can see.