open( my $testfile, "+>> $file" ) $!\n"; if ( -z "$testfile" ) ---> checking for empty file