Fix alnum_compar.pl to use cmp instead of <=> for the string comparision.
Also add tests in Perl.