在 Perl 中判断文件是否存在:
use strict;
use warnings;
my $filename = 'path/to/file.txt';
if (-e $filename) {
print "文件存在。\n";
} else {
在 Perl 中判断文件是否存在:
use strict;
use warnings;
my $filename = 'path/to/file.txt';
if (-e $filename) {
print "文件存在。\n";
} else {