File size
if
(
-z
$filename
) {
say
"
$filename
is empty"
; }
else
{
say
"
$filename
is not empty"
; }
Docs:
perldoc -f -x