Using Pragma to slit app in two

I have a free version of my app and a paid version. I was wondering if it is possible to use pragma script to compile them differently based on my package name

e.g.

if(package name = free)
   compile with this code
else 
   compile without that code

I have not used pragma much so I am wondering if it is possible.

Use custom defines in your player settings: