tools/dev/parrot_shell.pl - The Parrot Shell
% perl tools/dev/parrot_shell.pl
The Parrot Shell allows you to rapidly prototype Parrot code. It wraps your code in a ".sub main" and ".end", so you don't have to, unless your code begins with ".sub". It reads code from STDIN until it sees a line containing a single ".", which is how you tell parrot_shell to run the code you are giving to it:
Example: parrot_shell 0> $I0 = 42 $N1 = sqrt $I0 say $N1 . Output: 6.48074069840786
parrot_shell 1> quit Thanks for visiting the Parrot Shell, come back soon!
Each numbered Parrot Shell session is run in its own interpreter, so no registers or variables are shared/leaked between them.