A good subject for practicing the Schwartzian Transform.
$/='END:VCARD'; print map { $_->[1],"\n" } sort { $a->[0] cmp $b->[0] } map { [ /\bN:( +\w+)/, $_ ] } <>;

Replies are listed 'Best First'.
•Re: Sort VCards by Surname
by merlyn (Sage) on Jun 24, 2003 at 13:44 UTC