Re: Diff on a database structure

2007-05-07 Thread David Van Ginneken
This may work for you: http://www.adamspiers.org/computing/mysqldiff/ http://search.cpan.org/~aspiers/MySQL-Diff-0.33/ I tried it comparing 2 test databases here and it appears to work. On 5/7/07, Nigel Peck <[EMAIL PROTECTED]> wrote: Hi, When I'm developing web applications I have a dev ve

Re: creating hash from scalar variable

2007-05-03 Thread David Van Ginneken
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; $/ = "\n\n"; # Specify the record separator as 2 new lines.. my $fn = 'detail-20070423_1.txt'; open my $fh, '<', $fn or die $!; while(<$fh>){ my %test; map { my ($fn,$val) = split(/=/,$_,2); $fn =~ s/^\s*//g;

Re: creating hash from scalar variable

2007-04-29 Thread David Van Ginneken
I think something like this would work for you. my %test; map { my ($fn,$val) = split(/=/,$_,2); $test{$fn}=$val;} split(/\n/, $test); I noticed some of your values had equal signs in them, so in the inside split, I also specified you wanted 2 values so that you receive the full expected value b

Re: Create HTML code with perl

2006-09-04 Thread David Van Ginneken
On 9/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi All I need print HTML codes with perl: Tste Tste Tste Tste I tried with this way, but not work: print MAPA ""; print MAPA "\n"; print MAPA "teste\n"; print MAPA "teste\n"; print MAP

Re: MySQL in a for loop

2005-07-28 Thread David Van Ginneken
On 7/27/05, Charles K. Clarkson <[EMAIL PROTECTED]> wrote: > David Van Ginneken <mailto:[EMAIL PROTECTED]> wrote: > > : : #Get and process mail > : : for my $messageID (90){ > > : What exactly is this supposed to do? If you just run this > > : for my $m

Re: MySQL in a for loop

2005-07-27 Thread David Van Ginneken
Few things that I can see. I'm sure others will give you more ideas. On 7/27/05, David Foley <[EMAIL PROTECTED]> wrote: > Hi Guys, >Can you please look at the below script. The SQL query > works on it's own in separate script. But not when it is put into the > "for" loop in this s

Re: DBI insert vs update question

2005-07-10 Thread David Van Ginneken
Below is taken from: http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm Also look at: http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html Prepared statement support (server side prepare) To use server side prepared statements, all you need to do is set the variabl

Re: Microsoft Access storing images?

2005-07-03 Thread David Van Ginneken
I used the following to extract executable files from a MS-SQL server. Most likely will be able to do something similar with Access. use strict; use DBI; my $dbh = DBI->connect("dbi:ODBC:SOMEDSN", 'someuser', 'somepassword') or die "Error Connecting to DB\n"; $dbh-> {'LongTruncOk'} = 1; $dbh-> {'

Re: Spreadsheet::ParseExcel - Out of memory error

2005-04-27 Thread David Van Ginneken
Try something like this. I just tried it on 60+ files and it seems to work. (If you have multiple worksheets you may need to modify the cell_handler to exclude the ones you don't want) use Spreadsheet::ParseExcel; use File::Basename; use strict; my $resultMessage = ''; my $maxrow = 0; my $oBook;

Re: Create list of variables to be printed?

2005-02-02 Thread David Van Ginneken
Kevin, Would something like this work for you? Main program: - use strict; my $data_time = 'date'; my $TACH = 'tach345'; my $MP = 'mp123'; our @array; require 'config.pl'; foreach (@array) { eval 'print $' . $_ . ' . "\t"'; } print "\n"; --