Take a break, go for a walk, anything that doesn't involve thinking about coding.
Just start writing something, anything, the smallest step you can think of, and commit to version control as you go along. Clean up later.
Tell yourself "I am not this coding problem".
Ask a colleague for ideas.
(source, source, source)
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.