but apparantly it doesn't export all.. I was writing a test script to prove out the underpinnings of a calendar program (I know there are other 13098130 modules; this is the one I want..); Can anyone explain this?use Date::Calc qw(:all);
Running this as-is returns:#!/usr/bin/perl # use strict; use Date::Calc qw(:all); # Need current date my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(t +ime); $year += 1900; $mon ++; my @days = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); # How many days in this month? my $ditm = Days_In_Month($year, $mon); # What day of week is first, last day (so we can fill calendar out) my $dow_first = Day_of_Week($year, $mon, 1); my $dow_last = Day_of_Week($year, $mon, 30); print "Year = $year\n"; print "Month = $mon\n"; print "Day = $mday\n"; print "ditm = $ditm\n"; print "dow_first= $days[$dow_first]\n"; print "dow_last= $days[$dow_last]\n";
Undefined subroutine &main::Days_In_Month called at ./test.pl line 16.
:!./test.pl Year = 2004 Month = 6 Day = 7 dow_first= Tue dow_last= Wed
In reply to Date::Calc sub issue by keck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |