my $f = join ( '-', 'round1', $c, $f ) . '.txt'; my $exists = ( -e $f ) ? 'exists' : 'doesn\'t exist'; my $zero = ( -z $f ) ? 'empty' " 'not empty'; print join ( '-', $f, $c ) . ": $exists / $zero\n";