> I've tried with /g alone and also with /gs, /gm, and /gms. As long as /s is > one of the modifiers I do match one instance, but in no case do I match > multiple instances. Weird.
Give this a try... while (<MYFILE>) { if(m/(p1).*?(p2)/gs) { print "match! found $1 and $2.\n"; } } The problem is '.*' is greedy and slurps up everything between the first (p1) and the last (p2). '.*?' is non-greedy and will only match until the next instance of (p2). Shawn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]