>From: shawn wilson [mailto:ag4ve...@gmail.com]
>Sent: Saturday, February 12, 2011 5:56 PM
>To: beginners@perl.org
>Subject: DBD::mysql::st execute failed
>
>i'm getting this error:
>DBD::mysql::st execute failed: Column count doesn't match value count at
row
>1 at ./test-get.pl line 91, line 1.
Hello,
I have a script that has been generating a strange error that I can't seem to
find the source. In the script, at the top, we have the following to help
trouble shoot it if any errors:
#!/usr/bin/perl
BEGIN { open (STDERR, ">./scriptname_error.log"); }
In the error_log file it generates
file 1
2010-11-21,2
2010-12-01,1
file 2
2010-11-22,12
2010-12-01,11
this is for GD graph and the file file should be like this
2010-11-21,2
2010-11-22,12
2010-12-01,1,11
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://le
maybe this script may help:
use strict;
use warnings;
my %data;
while ( defined ( my $line = readline ) ) {
chomp $line;
my ($date, $num) = split(/,/, $line);
push(@{$data{$date}}, $num);
}
foreach my $date (sort keys %data) {
print join(',', $date, @{$data{$date}}), "\n";
}
pe
On 11-02-14 11:10 AM, Mike Blezien wrote:
Invalid offset:
And that's it. Normally it will indicate the line#, date, detailed error, etc.,
like in the apache error_log file. but this is all it shows. This is a cron
script also.
"Invalid offset" is not a Perl error message. Try scanning your
Pal,
I have to files that I am trying to match:
Generated from rpm -qa > file1
file1
libstdc++-4.1.2-48.el5
info-4.8-14.el5
libICE-1.0.1-2.1
libacl-2.2.39-6.el5
lcms-1.18-0.1.beta1.el5_3.2
dmidecode-2.10-3.el5
...
Generate from rpm -qa --queryformat '%{NAME}\n' > file2
file2
acl
alacarte
alc
What you should probably do is to use hashes.
Something like this:
1. Read the first file.
2. Split the each item of first file using an hyphen
3. Store the first item as the keys of hash say - file1_hash
4. Read the second file and store the items as the keys of a new hash say -
file2_hash
5. Lo
William Muriithi wrote:
Pal,
Hello,
I have to files that I am trying to match:
I think you mean two files?
Generated from rpm -qa> file1
file1
libstdc++-4.1.2-48.el5
info-4.8-14.el5
libICE-1.0.1-2.1
libacl-2.2.39-6.el5
lcms-1.18-0.1.beta1.el5_3.2
dmidecode-2.10-3.el5
...
Generate f
On 14/02/2011 16:10, Mike Blezien wrote:
I have a script that has been generating a strange error that I can't
seem to find the source. In the script, at the top, we have the
following to help trouble shoot it if any errors:
#!/usr/bin/perl
BEGIN { open (STDERR, ">./scriptname_error.log"); }
I