in reply to YAJAPH

If you think you understand what is going on in this program, ask yourself the following question:

What is @P for? Why does it have the value it has?

If you don't know the answer, you don't understand the program. @P is the most important data structure. Tampering with @P will break the program totally.