RE: :mysql::st execute failed

2011-02-14 Thread Ken Slater
>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.

Unable to determine error source

2011-02-14 Thread Mike Blezien
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 manipulation

2011-02-14 Thread Muzammil
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

Re: file manipulation

2011-02-14 Thread marcos rebelo
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

Re: Unable to determine error source

2011-02-14 Thread Shawn H Corey
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

Assistance with regular expression

2011-02-14 Thread William Muriithi
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

Re: Assistance with regular expression

2011-02-14 Thread Parag Kalra
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

Re: Assistance with regular expression

2011-02-14 Thread John W. Krahn
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

Re: Unable to determine error source

2011-02-14 Thread Rob Dixon
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