in reply to What is being matched?

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"; } }

Replies are listed 'Best First'.
Re^2: What is being matched?
by eversuhoshin (Sexton) on Apr 02, 2011 at 15:54 UTC

    Hello graff, I really like your print response hahaha :)