I have a somewhat strange requirement I want to find if a regex matched what exactly matched
to reproduce this ------------------ my @x; $x[0] = 'chi+ld*'; $x[1] = '\sjoke'; $_=getinput(); # for test assume $_="This is a joke"; if(/($x[0]|$x[1])/){ print "Matched '$1' \n"; } ----------------- I want to know if $x[0] matched or $x[1] matched What is the most efficient way of doing this ? Thanks Ram -- For spammers only [EMAIL PROTECTED] http://pragatee.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/