No such thing as a small change | |
PerlMonks |
wrinkles has asked for the wisdom of the Perl Monks concerning the following question:
Here's the error that I found in the error logs:# snippet of the code sub buttons { my $csv_file = '/home/user/mydomain.com/cgi-bin/files/spreadsheet.csv' +; my $csv = Text::CSV->new ( { allow_whitespace => 1, binary => 1, sep_c +har => '|' } ) or die "Cannot use CSV: ".Text::CSV->error_diag (); my $csv_fh; open ($csv_fh, "<:encoding(utf8)", $csv_file) or die "$csv_file : $!"; $csv->column_names($csv->getline($csv_fh));
Line 672 is the column_names line above. Perl version 5.10.0 I recently appended a couple lines to the spreadsheet.csv file. I took a look at the docs, but I'm in over my head here. Any hints appreciated. The rest of the sub follows[error] [client 66.200.100.66] sv_upgrade from type 8 down to type 6 +at myscript.pl line 672, <$csv_fh> line 1.
my @buttons; while (my $row = $csv->getline_hr($csv_fh)) { push(@buttons, $row) unless ($. == 1); } my %buttons_hash = ""; for my $button (@buttons) { my $this_item_name = ${$button}{item_name}; ${buttons_hash}{$this_item_name} = $button; } return \%buttons_hash; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: sv_upgrade error
by ikegami (Patriarch) on Nov 14, 2010 at 04:21 UTC | |
by wrinkles (Pilgrim) on Nov 14, 2010 at 04:47 UTC | |
by ikegami (Patriarch) on Nov 14, 2010 at 05:29 UTC | |
by Tanktalus (Canon) on Nov 14, 2010 at 05:33 UTC | |
by wrinkles (Pilgrim) on Nov 14, 2010 at 06:27 UTC | |
by wrinkles (Pilgrim) on Nov 14, 2010 at 06:43 UTC | |
| |
by ikegami (Patriarch) on Nov 14, 2010 at 07:39 UTC | |
by Tux (Canon) on Nov 23, 2010 at 01:01 UTC | |
by ikegami (Patriarch) on Nov 14, 2010 at 05:41 UTC | |
by ikegami (Patriarch) on Nov 14, 2010 at 05:24 UTC | |
Re: sv_upgrade error
by wrinkles (Pilgrim) on Nov 14, 2010 at 07:07 UTC | |
by aquarium (Curate) on Nov 14, 2010 at 23:34 UTC |