Special variables: Difference between revisions

m
→‎{{header|Raku}}: Fix link: Perl 6 --> Raku (but stale, needs more work)
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
m (→‎{{header|Raku}}: Fix link: Perl 6 --> Raku (but stale, needs more work))
Line 1,638:
(formerly Perl 6)
 
It is probably useful to briefly explain normal variables in Perl 6Raku before tackling special variables.
 
Variables in Perl 6Raku have a prefix sigil to distinguish them from named subroutines, functions, classes, and so on. There is a system of sigils to mark the fundamental structural type of the variable:
<lang perl6> $foo scalar (object)
@foo ordered array
Line 1,660:
Special Variables:
 
Perl 6Raku has deprecated most of the "line-noise" variables from Perl 5 in favor of named variables.
 
<lang perl6> $_ # The implicit variable lexically scoped to the current block
Line 1,703:
$*OUT # Standard output handle
$?PACKAGE # current package
$?PERL*RAKU # WhichRaku Perlversion amrunning I compiled for?under
$*PERL # perl version running under
$*PID # system process id
%=POD # POD
$*PROGRAM_NAME # name of the PerlRaku program being executed
%*PROTOCOLS # Stores the methods needed for the uri() function
::?ROLE # current role (as package or type name)
2,392

edits