in reply to Text::Unaccent::PurePerl undef values
With 5.10+, you can use the defined-or operator:
In older Perls, you need to be more verbose:@$ResultsFinal = sort { unac_string($a->[$OptOrderToDisplayTable] // " +") cmp unac_string($b->[$OptOrderToDisplayTable] // " +") } @$ResultsFinal );
unac_string( defined $a->[$OptOrderToDisplayTable] ? +$a->[$OptOrderToDisplayTable] : "")
Update: Fixed the code. If you had provided SSCCE, I could've tested my code :-)
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
In Section
Seekers of Perl Wisdom