How would you do it without Perl?
If you would do it by using ssh, there are SSH modules for automating that.
If you would do it by using a web browser, there are WWW::Mechanize modules for automating that, and modules for implementing that.
If you would do it by mail, there are modules for implementing that, too.
You don't tell us how you want to launch the script, so we can't be more specific. If you don't know what method to choose, ask your system administrator about the best choice for your network policies.