How would you do to re-order the fields in a MARC::Record-record?

I just needed that kind of thing and after some struggeling came up with:

@{$record->{_fields}} =
     sort  {
             lc($a->{_tag}) cmp lc($b->{_tag})
           }
     @{$record->{_fields}};


It seems to work, but I am interested in how others would address the same 
problem.

Leif
======================================
Leif Andersson, Systems Librarian
Stockholm University Library

Reply via email to