Edward Summers wrote:
Deleting subfields is a bit tricky since subfields may
repeat, and sometimes people just want to delete one of them. An
unfortunate state of affairs perhaps.
Yeah, I can see what you're saying, but doesn't that also apply to
repeatable fields? If a particular subfield that is one of a repeated
set needed to be deleted, it could be identified by a regex or by its
order in an array (following object syntax probably not correct):
@subfields = $subject->subfields();
foreach $notwanted (@subfields) {
if ($notwanted =~ /badsubject/) {
$notwanted->delete_subfield();
}
}
Mark
--
Mark Jordan
Head of Library Systems
W.A.C. Bennett Library, Simon Fraser University
Burnaby, British Columbia, V5A 1S6, Canada
Phone (604) 291 5753 / Fax (604) 291 3023
[EMAIL PROTECTED] / http://www.sfu.ca/~mjordan/