in reply to getting the First day of the month

"Can any one give me a real life example of this function [Monday_of_Week]..."

Yes. See I Don't Like Mondays. But if you want the first day of the month that doesn't have to be Monday, then it's not too hard with Time::Piece:

sub last_day { my $t = localtime; $t += Time::Piece::ONE_DAY * ($t->month_last_day - $t->mday + 1); return $t->fullday; }
Which, if run during this month, will print 'Monday' ... go figure. ;)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)