my $spider = Win32::IE::Mechanise->new(); my $agent = $spider->{'Agent'}; my $Excel = Win32::OLE->GetActiveObject ('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); $Excel->{'DisplayAlerts'} = 0; LINE: while () { ## Read $link and $title from filehandle ## this part works so I've left it out print "Getting link '$link'... "; $spider->get($link); print "ok\n"; print "Saving file as '$title'... "; my $doc = $agent->{'Document'}; $doc->SaveAs($title); print "ok"; }