http://qs1969.pair.com?node_id=460985


in reply to Re: string comparison
in thread string comparison

Seems like an overly complicated example. Isn't it just as simple as... ?
my $string1 = '~cake,pastry'; my $string2 = 'pastry,~caske'; if (sort_text($string1) eq sort_text($string2)) { print "match\n"; } sub sort_text { join(',', sort split(/,/, $_[0]) ) }
---
my name's not Keith, and I'm not reasonable.