var str = "rosetta code phrase reversal"; say str.reverse; # reversed string say str.words.map{.reverse}.join(' '); # words reversed say str.words.reverse.join(' '); # word order reversed
lasrever esarhp edoc attesor attesor edoc esarhp lasrever reversal phrase code rosetta
Last updated 1 year ago