The benefit of the feat Perfect Strike says
You can roll your attack roll twice and take the higher result. If one of these rolls is a critical threat, the other roll is used as your confirmation roll (your choice if they are both critical threats).
The pugwampi gremlin's unluck aura says
A pugwampi radiates an aura of unluck to a radius of 20 feet. Any creature in this area must roll two d20s whenever a situation calls for a d20 roll (such as an attack roll, a skill check, or a saving throw) and must use the lower of the two results generated.
A warrior possessing the feat Perfect Strike—and lacking a luck bonus to offset the aura's effect—uses the feat's benefit while within a pugwampi gremlin's unluck aura. How is the result of the warrior's attack determined?