On Mon, 29 Aug 2005, Anil Kumar, Malyala wrote:

> 
> I am new to perl and working for a small project...
> 
> I need some help from you..
> 
> How to get all the first days of a week in a month.

There is a module Date::Calc and from that

Day_of_Week

$dow = Day_of_Week($year,$month,$day);

Here is a little program for you.

---------------------------------------------
#!/usr/bin/perl

use Date::Calc qw(Day_of_Week);
use strict;

my $dow = Day_of_Week(2005,9,1);

print "$dow\n";
--------------------------------------------

The answer is 4. So now make an array or hash to convert the 4 to Thursday



Owen


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to