Skip to content

Instantly share code, notes, and snippets.

@snarkyboojum
Created March 17, 2010 23:33
Show Gist options
  • Save snarkyboojum/335859 to your computer and use it in GitHub Desktop.
Save snarkyboojum/335859 to your computer and use it in GitHub Desktop.
se v6;
# parse cmdline opts and run tardis
while (my $cmd = prompt '> ') {
given $cmd {
when /look/ { say 'look...' }
when /step/ { say 'step...' }
when /n/ { say 'n...' }
when /go (\d+)/ { say 'go $1' }
when /quit/ { exit }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment