in reply to Re^2: Best way to write to a file owned by root?
in thread Best way to write to a file owned by root?

I have use statements for modules that the root user does not know about.

Using lib or a combination of FindBin and lib in the script should help. For details, see the documentation of those modules.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)