Thanks, Rob. This method works fine because they are all scalar (foo, bar, and foobar). But what if bar is an array and foobar is a hash... How would you print them just as what you did in your example?
Also, what do you call this topic? Dereferencing the hash / array reference?