[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Comparing two arrays



On Jul 23, abigail@foad.org said:

>    map  {(split /\0/) [-1]}
>    sort
>    map  {join "\0" => key1, ... , keyn, value}

Depending on the size of 'n', would the first map be better off as:

  map /\0([^\0]*)$/,

(especially if value happens to be an empty string, since the split would
remove the empty trailing fields...).

-- 
Jeff "japhy" Pinyan     japhy@pobox.com     http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine            http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc.    http://www.perlarchive.com/
CPAN - #1 Perl Resource  (my id:  PINYAN)        http://search.cpan.org/


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe