in reply to Using Win32::OLE 'Excel' and stumped

You haven't shown us the printf output; should we assume that the filenames are being printed out all right?

Even so, it might have been better to use /\.\Q$filetype\E$/ in the regex rather than /^[\d\w\s]+\.$filetype/, for a variety of reasons. For one thing, it will ensure no nastiness after the ".xls" in the filename. It's a longshot, but barely possible.

On another note,

my $Book = $Excel->Workbooks->Open($files[$x]) or die " $! ";
is much better than
my $Book = $Excel->Workbooks->Open($files[$x]) || die " $! ";
in general. But I doubt that it's your problem here.

buckaduck

Replies are listed 'Best First'.
Re: Re: Using Win32::OLE 'Excel' and stumped
by cacharbe (Curate) on Apr 30, 2001 at 22:15 UTC
    Tried the:
    /\.\Q$filetype\E$/

    To no avail. *sigh* chuck.