Madam has asked for the wisdom of the Perl Monks concerning the following question:

HI, I want to find whether 2 strings are matching... consider the 2 strings,
my $string1 = ~cake,pastry my $string2 = pastry,~cake
the result should be the string1 & string2 are they are having same words in different order. and if the 2 strings are
my $string1 = cake,pastry my $string2 = ~cake,pastry
then the result should be the 2 strings are not matching... though they are in the same order,"cake" is different from "~cake" I searched in Q&A section but didnot find the correct solution.sorry to bother if the answere is already present here. -Madam