Trying to compare Perl to a language that was actually designed to handle strings efficiently is just not going to work out that well. 
Oh dear oh dear oh dear. This is a comment made out of pure ignorance.
Nice of you to give the TrueBasic code to compare, too. Even though the task given is ridiculously simple (and pointless, it would break with internationalisation for a start - how does TrueBasic handle that?). How is TrueBasic's regular expression engine?