Maybe, by using the schedule you can do it periodically.
But, If you use the MS SQL Server Express Edition, I recommend
you to create a service application to do that.
So, from this application you can do execute strored procedure that
execute the script for back up then to the folder that you want.
FYI, I'm not familiar with Perl. But, by using delphi I can do that so