IB2017 has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
I'm sorting an array deaccenting its elements with Text::Unaccent::PurePerl.
Everything is fine except that my array happens to have now and then some undef elements which apparently is not accepted by Text::Unaccent::PurePerl (Error: unac_string: Input character string is undefined). Any way to turn - on the run - these undef elements let's say, to an empty string ""? My array comes from reading a SQLite database. What would be the approach you suggest?
@$ResultsFinal =( sort { unac_string($a->[($OptOrderToDisplayTable)]) +cmp unac_string($b->[($OptOrderToDisplayTable)])} @$ResultsFinal );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Text::Unaccent::PurePerl undef values
by choroba (Cardinal) on Mar 18, 2018 at 20:00 UTC | |
by IB2017 (Pilgrim) on Mar 18, 2018 at 22:22 UTC | |
by choroba (Cardinal) on Mar 18, 2018 at 22:48 UTC | |
by IB2017 (Pilgrim) on Mar 18, 2018 at 23:13 UTC |
Back to
Seekers of Perl Wisdom