On Sun, Dec 12, 2010 at 7:52 PM, Onteria <onte...@scarletdevil.net> wrote: > I just finished working on a solution for the exercises provided in the > tutorial located here: > > A Beginner's Introduction to Perl 5.10 - Perl.com > http://bit.ly/dHvsqC > (shortened to prevent cutoff) > > Instructions for the exercise: > "Given a month and the day of the week that's the first of that month, > print a calendar for the month." > > and would like to request feedback on the solution with regards to ways > I could potentially improve this code. Also any mention of perldocs or > other documentation to look over would be most appreciated. Thank you > ahead of time for any feedback. >
wow, that's a bunch of code. this is why i use Date::Manip; for this sort of thing. it includes leap year. however, if you want to add leap year to this, maybe use something like if ($year % 4)... don't remember when leap year is, so adjust as needed. i also store all of my timestamps in epoch format which makes things easy (print time() ). however, if this is just an exercise and nothing practical, ignore all of this. however, since Date::Manip is pretty mature, you might look through that code for some decent ideas. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/