in reply to Re^2: Can a Perl script modify .htaccess
in thread Can a Perl script modify .htaccess

Assuming that you have exhausted all the other, safer means of achieving the same goal then in your place I might: