what I want to do is make my pattern a $var and i think i'm supposed to use rq{} to do it. I tried doing the rq{} my self but i just foobared that code. What I'm asking is how would I turn my pattern in a $var. any help or suggjestions would help a lot (I've been through the perlop already) ----------------------------------------------------------- Height : varies depending on my speed relative to the observer Weight : is a sensation caused by the gravitational wrapping of time-space Age : time is only a persistent illusion$file = shift; open(MAT, "<$file") or die "bad file name"; $text = <MAT>; while($text =~ /the/g) { $x += 1; } print "found $x matches\n"; close(MAT);
In reply to regex patterns by dogbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |