天天看點

perl驗證檔案存在且不為空

#!/usr/bin/perl

use strict;

my $file="./test.txt";

if( -f $file and -z _){

  print "==empty==\n"

}else{

  print "==yes==\n";

}

本文轉自cloves 51CTO部落格,原文連結:http://blog.51cto.com/yeqing/1681680

上一篇: perl-redis