in reply to getting day of the week
use POSIX 'strftime'; my $day = strftime('a', localtime(time)); [download]
The added benefit of using POSIX::strftime is that it will use the appropriate daynames according to your current locale settings, which is useful if you want to internationalize your application.
/J\