"Give this work to whoever looks idle." or "Give this work to whomever looks idle." [duplicate]
Give this work to who(m)ever looks idle.
Both forms sound a little weird because the construction imposes competing but unsatisfiable requirements: "who(m)ever" must be nominative because it's the subject of "looks", but it must be accusative because it's the head of "who(m)ever looks idle", which is object of the preposition "to" and it can't be both, so you have a quandary.
There's no way to get out of the quandary: you have to infringe one condition or the other. English is not well designed in this respect!