The function returns a hash. What you do with that hash is up to you. You haven't shown your program, so I can only give you general advice.
One approach would be to set up %ENV with the newly found values. Another one would be to merge %ENV with the newly found values, as you (and the example) show. A third approach would be to keep the two sets of values separate.
To simulate running under the login environment as closely as possible, %ENV = get_login_env() will certainly do that, but in the process, you lose any indication that your program is running as cron job. In general, I think the approach of merging %ENV and the values from the login environment, with the values from the login environment taking precedence is a good one.