Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: column count error followed by too few bind variables

by runrig (Abbot)
on Aug 02, 2011 at 23:25 UTC ( #918152=note: print w/replies, xml ) Need Help??

in reply to column count error followed by too few bind variables

You need to debug your code. E.g., what do you think this is doing:
Why is this line there:
my $j = 1+ $i;
Did you know you can more simply iterate over elements of an array with, e.g.:
for my $element (@h)
use print and/or warn to output messages until your satisfied that all of your variables are what you expect them to be. E.g. I don't know what this does because you didn't provide the source for it, and I'm sure I don't want to see it:
my @quotes = getquote(@symbols);

Replies are listed 'Best First'.
Re^2: column count error followed by too few bind variables
by AnomalousMonk (Bishop) on Aug 02, 2011 at 23:52 UTC

    Further to runrig's reply: The presence of the statement
    suggests baperl is not running with strictures (use strict;) or warnings (use warnings;) enabled, which might offer many suggestions about other problems in the code:

    >perl -wMstrict -le "my @h = qw(a bc def ghij); join(qq{\t}, @h), qq{\n}; " Useless use of join or string in void context at -e line 1. Useless use of a constant ( ) in void context at -e line 1.

    Update: Removed extraneous statement from example code.

Re^2: column count error followed by too few bind variables
by baperl (Sexton) on Aug 03, 2011 at 01:07 UTC
    thanks runrig, I've been staring at this code and testing and trying so many different iterations that I accidentally left the
    my $j=...
    I will fix the join, and these are the methods I am using
    #!/usr/bin/perl -w use strict; use Finance::YahooQuote; use DBI; use DBD::mysql; use DBIx::Simple; use SQL::Abstract;
    I suspect that is what you were refering to when you said the source for my @quotes.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://918152]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-08-13 09:43 GMT
Find Nodes?
    Voting Booth?

    No recent polls found