On Feb 17, 2006, at 11:14, Mike Martin wrote:
Done that its fine
I have even opened a FH a printed - also fine (apart from bin
garbage of
course)
Just tried
my $excel_file='literal file name';
print $excel_file;
prints fine
Of course it prints fine. What I want you to debug is the *exact
value* you are passing to Parse(), no guesses, print the exact
variable and put quotes around to detect spurious whitespace. Do that
right before the call to Parse().
just Parse only seems to accept a lteral name
The working assumption is that the Parse() subroutine does not
distinguish whether the string comes from a variable in the caller or
a literal string (that's the general case). When you write a
subroutine like that you program something like
sub Parse {
my ($class, $filename) = @_;
# ...
}
so $filename gets the string with the file name no matter how it
looked in the caller's code. According to the documentation Parse()
accepts more than file names, but that shouldn't interfere unless
it's buggy, which I wouldn't assume.
Note that since you pass a file name to Parse() you don't need to
open a filehandle for it, that's the job of the module. Otherwise it
would ask for an opened filehandle. Please remove the open call that
opens the excel file and try again. I don't think that's the problem,
but the problem is not very clear either.
If it still does not work and $workbook is undef (please, check that
as well) please send a _minimal_ example that reproduces the problem
so we can debug it a bit.
-- fxn
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>