http://qs321.pair.com?node_id=355155

rjahrman has asked for the wisdom of the Perl Monks concerning the following question:

I am searching to see if $string contains a substring, let's say "P100". However, I also want it to match to "P-100" and "P 100", or even "P1 00". The P100 is a variable; right now I have "if ($string =~ /\Q$model\E/)", so whatever I do needs to be programmatic . . . any ideas?

Thanks for the help.