Skip to content

Instantly share code, notes, and snippets.

@AlexDaniel
Created April 7, 2020 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexDaniel/a6c6b1a1d56caf3be49e41e4ede26b2c to your computer and use it in GitHub Desktop.
Save AlexDaniel/a6c6b1a1d56caf3be49e41e4ede26b2c to your computer and use it in GitHub Desktop.
sub MAIN () {
loop {
state $n = 0;
put $n++;
last if $n > 2;
FIRST { put "Starting loop. \$n is n" }
LAST { put "Finishing loop. \$n is n" }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment