Check if item with x custom data is anywhere in inventory

I'm trying to check if someone has an item with the custom data "perk:1" and give them 2 extra damage if they do. How would i do this?
Continue to help post