in reply to passing an array

Use references (see perlref). For example...
my @data = qw( Mon Tue Wed Thurs Fri Sat Sun ); print get_day( $today, \@data ); sub get_day { my ( $index, $datar ) = @_; return $datar->[$index]; }

Update: You know, it helps to have a @_ in a sub too :-/


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain