--0__=zj3UFHGB1Xi75kxneGhrFUHsizOHCfn5hFcUocH6oQ0EaoWH1XDgxrE6 Content-Type: text/plain; charset=us-ascii Maybe an oversimplistic answer. The regular expressions in Perl have no problem searching the big ol' string, and that way you don't need a loop. Just do the test bigOlString =~ /regular expression/ No?