Letter of the Law

What does the idiom “Letter of the Law” mean?


The explicit meaning of a law, as opposed to the “spirit” of the law, the law’s general intention

For example:

“The judge did not think Sheila was in the wrong, but according to the letter of the law he had to punish her.”