Twigils and special variables
Perl 6 has a large set of special variables. In order to
make it easy to differentiate them from regular variables,
they are marked with a second prefix called twigil.
Regular, user defined variables have a sigil ($, @ or %) in front of them.
System variables have and additional character between the sigil
and the name of the variable.
$*PROGRAM_NAME contains the path to the currently running Perl 6 script.
$*CWD contains a path to the current working directory.
$*IN is the standard input (STDIN). You can read a line using $*IN.get
You can read more about them in S28
Table of Contents
In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
comments powered by