use strict; use warnings; ... close( $f2 ); #close output file handle }