close (FH) or die "Could not write all data to $file_or_pipe: $!";