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

Hrm.. I can run this just fine on my W2k box (only changed the path's). Make sure that your path etc is correct, print out what you are adding to the array prior to pushing it in there.
Also, perhaps just a style thing, but I think that
foreach $elem (@allfiles){ if ($elem =~ /[\d\w\s]+\.$filename/){ #rest of if code }
looks much nicer and is much easer to read than those for loops, or even better drop the $elem alltogether and use $_.

Update: If I change the "\\" to "/" (forward slashes should work the same as double-backslashes) I now get the error, otherwise everything still works fine...

Replies are listed 'Best First'.
Re: Re: Using Win32::OLE 'Excel' and stumped
by cacharbe (Curate) on Apr 30, 2001 at 21:56 UTC
    'Print out what I am pushing in'...I did. Path is correct.

    foreach vs. $# *shrug* Used both in this instance. So many ways to get to the same end...

    Chuck.