I would strongly advise that, instead of “creating variables,” you should always create “keys in a hash.” The namespace of “variables in the currently-running program” should never be polluted by anything that is read from an external data-source. (This was probably the worst idea that PHP ever came up with ...) The trouble is that, if the name matches an existing variable, and is unthinkingly permitted to replace it, the program will either be crashed or, infinitely worse, deliberately exploited. In any case, such a program can never be reliable.
You should write the program to read the file line-by-line, then, say, split() each line into “key” (formerly known as “variable-name” ...) and “value” components. Then, $hashref->{$key} = $value;. Now, the file can pretty-much contain anything that it wants, because the only thing that will actually be affected ... or that can possibly be affected, is: the set of keys in $hashref. Not the program’s own variable-pool.