http://www.perlmonks.org?node_id=958315

jaldama has asked for the wisdom of the Perl Monks concerning the following question:

I've googled around, but haven't found anything regarding this:

Can't locate define.pm in @INC (@INC contains: /Library/Perl/Updates/5 +.10.0/darwin-thread-multi-2level /Library/Perl/Updates/5.10.0 /System +/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/ +5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/ +5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Netwo +rk/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Ext +ras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.1 +0.0 .) at excel3.pl line 30. BEGIN failed--compilation aborted at excel3.pl line 30.

Does anyone know what is wrong? I am playing around with reading an excel file using Spreadsheet::Parseexcel

#!/usr/bin/perl -w use strict; use Spreadsheet::Parseexcel; #utility function to safely look inside a cell sub cell { my ($Wks, $r, $c) = @_; if (defined $Wks->{Cells} [$r] [$c]) { my $val = $Wks->{Cells} [$r] [$c]->Value; chomp $val; return $val; } return ""; } my $parser = new Spreadsheet::ParseExcel; my $workbook= $parser->Parse('tags sample.xls'); my $page = $workbook->{Worksheet} [0]; use define { TAGS => 0, PAGES => 1, PAGEVIEWS => 2, PAGEVISITS => 3 }; my ($tags, $pages, $pviews, $pvisits); format STDOUT_TOP = Tags Pages Page Views Page Visits . format STDOUT = @<<<<<<>>>>>>>>> @ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> $tags, $pages, $pviews, $pvisits . foreach(my $i=0; $i {MaxRow}; $i++) { $tags= cell ($page, $i, TAGS); $pages = cell($page, $i, PAGES); $pviews = cell($page, $i, PAGEVIEWS); $pvisits = cell($page, $i, PAGEVISITS); write; }