You can compare $s1 and $s2 above with
to extract the data itself, you'll need a dereference: $$s1
This uses POSIX::setlocale. The basic collation conversion is done by
strxfrm() which terminates at NUL characters being a decent C routine.
collate_xfrm() handles embedded NUL characters gracefully. Due to
cmp
and overload magic, lt
, le
, eq
, ge
, and gt
work also. The
available locales depend on your operating system; try whether C``xx_XX.(ISO)?8859-N''
or ``xx_XX.(ISO)?8859N''
, for example
``fr_CH.ISO8859-1''
is the Swiss (CH) variant of French (fr),
ISO Latin (8859) 1 (-1) which is the Western European character set.