Re: Deleting a subfield using MARC::Record

[email protected] (Michael Kreyche)
Newsgroups perl.perl4lib
Message-ID <[email protected]>
Edward Summers wrote:

> That could work if subfields were objects, but they're just strings. It 
> could simply delete all of them unless a second parameter is passed in, 
> which would basically act like a filter:
> 
> $field->delete_subfield('a', qr/badsubject/);

That sounds pretty good, though I'm working with a database where I 
found a 6xx field with two identical occurrences of subfield 2. So what 
you propose would, I suppose, delete both of them and I'd have to put 
one back in. Add another parameter to specify which occurrence?

Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.