【发布时间】:2011-02-18 08:04:40
【问题描述】:
在使用用户定义的变量时,如果没有'@'-sigil,我有什么不能做的吗?
#!perl6
use v6;
my $list = <a b c d e f>;
my @list = <a b c d e f>;
$list.list.perl.say;
@list.perl.say;
$list[2..4].say;
@list[2..4].say;
$list.elems.say;
@list.elems.say;
$list.end.say;
@list.end.say;
say 'OK' if $list ~~ /^c$/;
say 'OK' if @list ~~ /^c$/;
【问题讨论】:
标签: variables raku sigils rakudo-star