So what you can do then is put your unverified perl code in a post skip on the page where P1 is answered. Post skips run before any other logic. So here is what I would do.
Add a postskip to question P1. Make sure its the first one as postskips run in sequential order. As the skip to question just put always and any question you want. It won't matter because we are not going to use it.
As the logic in the postskip put the following
Begin Unverified Perl
The bottom line return 0 is important as it tells the post skip block to not skip to the question designated. Post skip logic should evaluate to true or false. 1 = true, 0 = false. But it doesn't matter what the code does because it will still run the code as long as the end result is a boolean value.
So what you should expect to happen is the respondent will answer P1. P1 will be recorded, This setvalue code will run before questions future pages or questions are evaluated. By doing this, everything should be in place for your constructed list.