*My Code:* my $logfile = "logfile_with_content"; if (-w $logfile) { print ("True - file exists but empty"); } if (-s $logfile) { print ("True - file exist and has content"); }
*My Output:* True - file exists but empty True - file exist and has content *My Question:* Why do both test evaluate to true when the file called "logfile_with_content" is 5K in size? I would expect the second file test to only work? Any advice? Thanks