Skip to content

Instantly share code, notes, and snippets.

@wayland

wayland/Let-test Secret

Created May 23, 2024 11:04
Show Gist options
  • Save wayland/a5209aab36925c78f27cf2dae2d39d74 to your computer and use it in GitHub Desktop.
Save wayland/a5209aab36925c78f27cf2dae2d39d74 to your computer and use it in GitHub Desktop.
Raku Let test 1
#!/usr/bin/raku
my $answer = 42;
say "Answer 1 is $answer";
{
let $answer = 84;
say "Answer 2 is $answer";
1;
}
say "Answer 3 is $answer";
{
let $answer = 63;
say "Answer 4 is $answer";
False;
}
say "Answer 5 is $answer";
$ raku Let-test
Answer 1 is 42
Answer 2 is 84
Answer 3 is 84
Answer 4 is 63
Answer 5 is 63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment