Not as neat as ikegami solution but it should workopen(FILE, "./logfile.sql"); my %foo; while (<FILE>) { my $index; if (m/Field0=(.*)\;/) { $index = $1; } else { # something didn't match correctly $index =""; } $foo{$index}++; if ($foo{$index} == 1) { # make insert statment } else { # make update statement. } }
In reply to Re: Altering SQL code from Update to Insert
by xorl
in thread Altering SQL code from Update to Insert
by AFritz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |