if ( $text=~m/\b(director|resignation)\b/ ) # code that shows which word matched: { if( $1 eq 'director') { print "That's the director? Get rid of him!\n"; } else { print "You can't resign, you're fired!\n"; } }
In reply to Re: What is being matched?
by graff
in thread What is being matched?
by eversuhoshin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |