in reply to Help with Excel::Table
Hello BernieC,
It looks like there’s a mismatch between (1) the regular expression used to separate directory and filename, and (2) the actual input. The regex /(.*)\/(.*)/ splits on a forward slash, but the input contains either a backslash (from the error message) or no slash at all (from the specified input: getWB("D:myexcel.xlsx")).
It’s safer to use the core module File::Basename here:
my ($dir, $excel) = fileparse($_[0]);
Whether this is your real problem, I don’t know, but at the least it’ll remove one layer of possible confusion as you seek to debug the problem. In that case, the monks will require more information — preferably in the form of an SSCCE — to be able to assist with the debugging process.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help with Excel::Table
by BernieC (Pilgrim) on Sep 25, 2020 at 20:19 UTC | |
by Athanasius (Archbishop) on Sep 26, 2020 at 09:10 UTC | |
by BernieC (Pilgrim) on Sep 26, 2020 at 11:34 UTC | |
by Tux (Canon) on Sep 26, 2020 at 12:40 UTC |