假设我有大量的perl脚本根本没有use stirct
,我只想观察use strict
上的运行时错误。我可以这样做吗?
#!/usr/bin/perl
use strict;
my $foo = '1';
my @bar = @{$foo}; # wrong!
print "done";
1;
STDOUT:
done
STDERR:
Can't use string ("1") as an ARRAY ref while "strict refs" in use at test.pl line 5.