Last active
January 13, 2017 17:34
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| put $*PROGRAM-NAME; | |
| say 'hello world'; | |
| put 'hello world'; | |
| say 'Hamadryas' ~~ m/ Hama /; | |
| my $pattern = rx/ Hama /; | |
| say 'Hamadryas' ~~ $pattern; | |
| say so 'Hamadryas' ~~ $pattern; | |
| $_ = 'Hamadryas'; | |
| put $pattern ?? 'Matched' !! 'Missed'; | |
| if $pattern {put 'matched'} else {put 'missed'}; | |
| $pattern = rx/ | |
| H | |
| [ # group this next part | |
| A | |
| :i # case insensitive to the end of group | |
| m | |
| ] | |
| A | |
| /; | |
| say so 'HAMADRYAS' ~~ $pattern; | |
| for dir() -> $dir { | |
| given $dir.IO { | |
| if .e { | |
| put qq:to/DONE/ | |
| Name: $_ | |
| Modified: { .modified.DateTime } | |
| Accessed: { .accessed.DateTime } | |
| Changed: { .changed.DateTime } | |
| Mode: { .mode } | |
| DONE | |
| } | |
| when :e & :f { put "Size is { .s }"} | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment