sub read_prog print <<"EOF"; print "This is the var \$APPNAME and this is what needs to get substituted $APPNAME\n"; EOF 1;