open( my $testfile, "+>> $file" ) $!\n"; ---- ---- some condition check now adding some other info to the existing file close the file