Which one is correct from the structural point of view? Why?:
Only once in a blue moon will Mr. Smith let us get out of class early.
or
Only once in a blue moon, Mr. Smith will let us get out of class early.
Both are correct.
Only once in a blue moon will Mr. Smith let us get out of class early.
Inversion is used correctly, will is moved to the front of the subject Mr. Smith
Only once in a blue moon, Mr. Smith will let us get out of class early.
Original form of the first sentence, of course this is correct!
As per OP's comment about the usage of inversion of auxiliary verbs, this may help: https://english.stackexchange.com/questions/469178/english-subject-auxiliary-inversion/475907#475907
and this: Neither nor inversion Hope this helps ;)
The key to the answer is the inversion. You can watch more useful explanations here: