perl not reading my variable

I'm trying to make changes in a file using the following bash script:

#!/bin/bash

MYHOME=`echo $HOME`
README=$MYHOME"/environment"
IAM=`whoami`

CHANGEPATHLIST="TALOG TACONFIG TAINFO TAWORK TMPSPACE"

for var in $CHANGEPATHLIST
do
   perl -pi -e 's/sacuser1/$IAM/ if m/$var/' $README
done

The problem is $var and $IAM are interpreted as null. If I echo the values of these variables, I can see that they are correct.
So I guess my question is am I not allowed to use variables in the above perl command?

TIA,
Jennifer

I'm not sure what you are trying to do, things seem out of place - but

perl -pi -e "s/sacuser1/$IAM/ if m/$var/" $README

Change the single quotes to double quotes.
Plus ~ is translated to $HOME - try that instead of the MYHOME thing.

Thank you thank you thank you!
The double quotes did the trick. But why? Are the vars interpreted differently when I use double quotes?

Otherwise '$var' and '$IAM' are passed as is to Perl, rather than the values expanded by the shell.