What is the effect of the invocation of Symbol::gensym?
In this case, just a lazily copied expression. Quoting Symbol:
Symbol::gensym creates an anonymous glob and returns a reference to it. Such a glob reference can be used as a file or directory handle.
And that's it. It was needed in ancient perls. Perl 5.6.1 introduced autovivication for file and directory handles (see perl561delta), so Symbol::gensym is technically no longer needed. open my $fh, ... or open local $fh, ... is sufficient.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)