use strict;
use warnings;
my $dir = "/";
my @old = `ls -1rtA $dir`;
#print @old;
my #variable declaration
while(1){
$oldlen = scalar @old;
@new = `ls -1rtA $dir`;
print @new;
$newlen = scalar @new;
if(@old ~~ @new)
{
}
else
{
$diff=$oldlen+1;
print "$diff \n";
print "$list \n";
#print "@new[$list] \n";
#$op=$new[$list];
print "$newlen \n";
#pop @core,$op;
print "@new[$diff..$newlen]";
print @core;
}
}
我收到以下错误:
在连接或字符串中使用未初始化的值print "@new[$diff..$newlen]";
是什么导致了这个问题?
错误是什么意思?