in reply to Inherent 'which' command for perl
if(-s $filename){print "file exists and is non-zero size";} elsif(-e $filename){print "file exists and is zero size";} [download]