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
In reply to Re: Date function
by ww
in thread Date function
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |