in reply to Re^4: strptime("%Y-%m") in perl6
in thread strptime("%Y-%m") in perl6

In Perl6, the special MAIN subroutine, if any, receives the arguments passed to the program and can be used to check their type and validity:
~ perl6 -e 'sub MAIN (Int $month where 1 <= $month <= 12) {say "Succes +s";}' 4 Success ~ perl6 -e 'sub MAIN (Int $month where 1 <= $month <= 12) {say "Succes +s";}' 14 Usage: -e '...' <month> ~ perl6 -e 'sub MAIN (Int $month where 1 <= $month <= 12) {say "Succes +s";}' 8.5 Usage: -e '...' <month>
Is this the type of thing you're after?