in reply to Re: string comparison
in thread string comparison
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]) ) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: string comparison
by tphyahoo (Vicar) on May 27, 2005 at 10:02 UTC |