make environment var setting more useful

value is now interpreted as a Perl expression rather than just a string
also prints what it set the var to in --pretend mode