-
-
Save zoffixznet/c3931e94a222526b1fc4babd9290ffa1 to your computer and use it in GitHub Desktop.
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
say first-letter "hello"; | |
say last-letter "hello"; | |
say middle-letters "hello"; | |
sub first-letter { | |
substr $^word, 0, 1 | |
} | |
sub last-letter { | |
substr $^word, *-1, 1 | |
} | |
sub middle-letters { | |
substr $^word, 1, *-1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment