in reply to substr pattern matching

Hmmmm ... are you possibly wanting the index function?
use strict; my $string = "Billiard"; if (index($string,'Bill') > -1) { print "found it!\n"; }
This is not a pattern match, however ... looks like your code should work fine.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)