temp creates a temporary variable and restores its value at the end of the scope (like it does the local built-in operator in Perl 5).
my $x = 'x';
{
temp $x = 'y';
say $x; # y
}
say $x; # x
Compare it with the following operator, let.
Science, Programming, Electronics, Languages
N. B. Perl 6 has been renamed to Raku. Click to read more.
temp creates a temporary variable and restores its value at the end of the scope (like it does the local built-in operator in Perl 5).
my $x = 'x';
{
temp $x = 'y';
say $x; # y
}
say $x; # x
Compare it with the following operator, let.