use strict; use warnings; use Win32::OLE; my $excel = Win32::OLE->CreateObject('Excel.Application'); $excel->{Visible} = 1; sleep 5; $excel->{Visible} = 'False'; sleep 5; $excel->{Visible} = 1; print "press enter..."; ;