sub tell_me_the_day { $date = shift(); # a scalar, say 2003-07-01 ### chop the $date scalar up with a regex then push (@date_parts, $1,$2,$3); ### using Date::Manip; return &Date_DayOfWeek( $date_parts[1], $date_parts[2], $date_parts[3] ); }