legend has asked for the wisdom of the Perl Monks concerning the following question:
I have some text like:
I want to capture the words and the number into two different strings like say:$text = "Grand Canyon 70%";
I was trying:$match[0] = "Grand Canyon"; $match[1] = "70%";
But I am getting a bunch of compilation errors complaining about the double tilde... Can someone help me out please?$text ~~ /([A-Za-z\s]*)([0-9]{1,2})[%])/;
Back to
Seekers of Perl Wisdom