use Win32::OLE;
use Win32::SAM;
#use Win32::Slingshot;
$| = 1;
my $URL = "http://www.google.com/";
my $seconds;
$Win32::OLE::Warn = 3;
StartIE();
$seconds = Navigate($URL);
print "Google Page took $seconds seconds to load\n";
SetEditBox("q","Presidents");
$seconds = ClickFormButton("btnG");
print "Query Page took $seconds seconds to load\n";
Going through the code line by line...
use Win32::SAM
This tells PERL to use c:\perl\site\lib\win32\SAM.pm. It is the module that contains the built in samie subroutines, like StartIE and SetEditBox.