在处理Perl Weekly Challenge 006的挑战1时,我收到了运行我的代码的消息:
Out-of-sync package detected in LANG1 at env perl6
my $string= @*ARGS ?
(value in braid: GLOBAL, value in $*PACKAGE: GLOBAL)
1-3,5-8,11,13
它只通过多次调用相同代码和相同输入来显示 ONCE 。
以下代码的确切调用:
./ch-1.p6 1,2,3 ,5,6,7,8,11,13
#!/usr/bin/env perl6
my $string= @*ARGS ?? @*ARGS.join(",")!! prompt "Enter numbers: ";
my $a=$string.split(",",:skip-empty)>>.trim.grep({!/^$/})>>.Int.Bag;
my @r1=$a.keys.sort;
my @diff=@r1.rotate >>-<< @r1;
my @p=(0,|map {|($^k,$k+1) if abs($^v) > 1}, @diff.kv);
@p.pop;
say join ",", map {@r1[$^a]==@r1[$^b]??@r1[$^a]!!"@r1[$^a]-@r1[$^b]"}, @p;
该消息是什么意思,为什么会随机出现?
更新
这又在另一个程序中再次发生:
Out-of-sync package detected in LANG1 at env perl6
my $count =0;
my $nu
(value in braid: GLOBAL, value in $*PACKAGE: GLOBAL)
我需要重新安装吗?