Perl Weekly Challenge 019: Five Weekends and Paragraph Wrapping
This week’s challenge was a bit easier than the recent ones, but I was glad for that. The Perl Conference in Riga is coming and I still don’t have my slides ready!
Five Weekends
Write a script to display months from the year 1900 to 2019 where you find 5 weekends, i.e. 5 Fridays, 5 Saturdays, and 5 Sundays.
I started by running the cal
utility (part of the util-linux
package) to see how such months might look. For example, this is the output of cal 1904 (5 weekends highlighted manually be me):