Try what I have suggested on your other post, although it works well for me the way it is..
replace in both of those cases
Code
sort $method
with
Code
sort &stringsort($a, $b, $in{sorder})