xy123321 发表于 2018-8-30 11:13:25

perl验证文件存在且不为空

  #!/usr/bin/perl
  use strict;
  my $file="./test.txt";
  if( -f $file and -z _){
  print "==empty==\n"
  }else{
  print "==yes==\n";
  }

页: [1]
查看完整版本: perl验证文件存在且不为空