in reply to Doubt regarding parsing
Tip #2 from the Basic debugging checklist: print
use Spreadsheet::ParseExcel; my $filename = shift || "C:\Earthlink.xls"; print "$filename\n"; my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse("$filename"); if ( !defined $workbook ) { die $parser->error(), ".\n"; }
This prints:
C:arthlink.xls File not found.
Use single quotes to prevent interpolation of \E:
my $filename = shift || 'C:\Earthlink.xls';
A good text editor with syntax highlighting is also helpful in distinguishing literal strings from escape sequences.
|
---|
Replies are listed 'Best First'. | |
---|---|
A reply falls below the community's threshold of quality. You may see it by logging in. |
In Section
Seekers of Perl Wisdom