know LWP:: UserAgent, but I cannot figure out how to set it up. Thanks
The method agent in that module is the way to change the user agent string.
As to what the contents of the string should be, I cannot say, and it is not a Perl-related question. The author of the code that is trying to access the SEC files (that is to say, you) should read the documentation that the SEC provides that explains the contents of the user agent string needs to have in order to be in compliance with their terms of service. They link to that documentation in the error message that you now know how to see in its entirety. Good luck.