DingoBaby has asked for the wisdom of the Perl Monks concerning the following question:
Right now, with the code as it is..The TEST field is being updated for all records instead of only the records with LASTNAME = Smith. Many thanks for any suggestions you might. Im sure Im over looking something simple but Im just starting with Perl and I tend to miss things. Thank you, Todduse Xbase; my $table = new XBase "live.dbf" or die Xbase->errstr; for (0 .. $table->last_record) { my ($deleted,$lastname) = $table->get_record($_,"LASTNAME"); die $table->errstr unless defined $deleted; next if $deleted; $table->update_record_hash($_,"TEST"=>"It works") if $LASTNAME + == "Smith"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with using XBase
by VSarkiss (Monsignor) on Jan 25, 2002 at 01:22 UTC | |
by DingoBaby (Initiate) on Jan 25, 2002 at 03:28 UTC | |
by VSarkiss (Monsignor) on Jan 25, 2002 at 04:11 UTC | |
|
Re: Question about XBase
by Zaxo (Archbishop) on Jan 25, 2002 at 06:19 UTC |