Re: deconstruct and reconstruct a field

2004-08-03 Thread Jackie Shieh
Thanks! The script returns an error msg: Global symbol "$f500" requires explicit package name at s.pl line ### Execution of s.pl aborted due to compilation errors. The $f500 was deleted in the earlier loop. Was that the cause? BTW, was there a difference between the close curly bracket with or

Re: deconstruct and reconstruct a field

2004-08-03 Thread Timothy Prettyman
In your foreach loop, you write a new 534 for every 500 that you find. The first one has the subfield a from it, the 2nd one has a subfield a from the first and second, etc. What you really want to do is something like: if (@f500s) { my @subfields = (); foreach my $f500 (@f500s) { $f500->

deconstruct and reconstruct a field

2004-08-03 Thread Jackie Shieh
I am deconstructing multiple 500 note fields and putting the data in subfield n of 534 (Notes to original version). When there are more than one 500 notes, this script creates two 534 fields, one with the first previously 500 note field in subfield n, and the other 534 field with two 500 note fie