The problem is with the path used $restrictfile. I get your error if my path is wrong, make sure you use the full absolute path.(eg 'c:\\myfiles\\test.xls') Excel defaults to My Documents when it calls Open() vs the local directory your are executing your script from.
JamesNC
Comment on Re: Problems with Win32::OLE and different Office versions
I've also found that even though Perl can handle forward slashes as path delimiters, Excel can't. For example:
# ... other code before this ...
if (-e "c:/myfiles/test.xls")
{
# We get here just fine, but...
$Book = $Excel->Workbooks->Open("c:/myfiles/test.xls")
or die "Hork!\n";
# Dies
}