The paper proves that the Dirichlet problem for the first-order Hamilton-Jacobi equation in an open subset of R n where D x′ u is the partial gradient of the scalar function u with respect to the first n′ variables (n′ ≤ n), has a viscosity solution which is unique a.e. When applied to the periodic homogenization of Hamilton-Jacobi equations in a perforated set, the result yields the a.e. convergence of the solutions of the problem at scale ε as ε → 0 to the solution of the homogenized Hamilton-Jacobi equation.