in reply to coding for excel in perl

Basically, you use Win32::OLE to make the same calls from Perl that you would do from VBA. The Win32::OLE documentation shows how to translate the calls.