PWC 259 Something I think's worthwhile if a parser makes you smile

Bob Lied - Mar 10 - - Dev Community

Short on time this week, so just a skeleton of a post about Perl Weekly Challenge 259

Task 1 is a variation on Fizz Buzz. Count days, but skip over weekends and holidays. Use the DateTime module to snarf up date strings (I love the smell of ISO8601 in the morning) and ignore pesky thoughts about leap years and daylight saving time. Play the Bee Gees Holiday on repeat.

Task 2 is a parsing problem. We could go all computer-science on it and write some kind of lexical tokenizer and grammar with a recursive descent parser. Or we could go hack-orific with regular expressions and obscure Perl features. I think you know where I'm going with this. You'll need this note on the flip-flop operator.

The solutions are on Github.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player