$_[0] =~ s/%(HTTP_HOST|REMOTE_ADDR|REMOTE_PORT|REMOTE_USER)%/handleEnvVariable($1)/ge; #### $_[0] =~ s/%([A-Z_]+)%/handleEnvVariable($1)/ge;