In the next picture can be seen within the housing, near the inlet:
These are "acoustic liners"; they allow the sound waves to get "trapped" in the holes and make the engine quieter. Sometimes chunks tear loose and they're repaired with what amounts to Bondo.
The holes you are referring to are a part of the engine-inlet anti-icing system. These holes prevent ice accumulation around the engine inlets. Without them, the engines may ingest ice and will also encounter airflow problems. Engines require laminar airflow in order to operate efficiently.