in reply to Date function

Alternately, a regex will work:

perl -E "my $month=3;if ($month =~ / 1|3|5|7|8|10|12/ ) {say $month; }else{say 'goofed.';}"

Prints: 3


If you didn't program your executable by toggling in binary, it wasn't really programming!