(UN*X shell programming, test, [:)
The test -s filename tests whether filename exists and has a nonzero size. For instance:
if [ -s $f ]; then
  echo "$f is non-empty!"
fi
with the Bourne shell or a compatible.
(Perl:)
Borrowing from the aforementioned usage in the shell, the test -s filename returns the size of filename, or undef if it does not exist. In particular, if you use it as a test, since 0 is false too, you get precisely the shell's test behaviour:
print "$f is non-empty!\n" if -s $f;