You can also use this bizarre construction to capture just the count:

    $_ = "ABabcde12345BAABabcde1234blahblah5BA";
    $count = () = $_=~ /(AB.*?BA)/g; 
    print "I matched $count times\n"'

the () between the two ='s forces the match to list context, and then
THAT is forced to scalar context by setting it to $count.  Whee!
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to