in reply to getting arrays into subroutines

Simple answer, you can't! You can only pass scalar values to a sub.

You can however pass references, I recomend looking at perlref.

Update: One other thing, by searching this site, or just wandering through the Code Catacombs, you will find a ton of examples on how to do this.

"Nothing is sure but death and taxes" I say combine the two and its death to all taxes!