On Wed, Feb 28, 2001 at 04:54:23PM -0600, mjn wrote: > Alright, am I stupid or what. > > I have this regexp: > > $_ =~ /foo.+bar/s > or this one > $_ =~ /foo.+bar/sm > > > And I would expect either of them to find > > foo > bar > > in a given text file. The problem I am having is that it is not matching. > Is there something I am doing wrong? Where is $_ coming from? Are you, perhaps, doing while (<MYFILE>) { $_ =~ /foo.+bar/sm ... } ? (If so, $_ will only contain one line ("foo\n" or "bar\n") at a time.) -- SGI products are used to create the 'Bugs' that entertain us in theatres and at home. - SGI job posting Geek Code 3.1: GCS d? s+: a- C++ UL++$ P++>+++ L+++>++++ E- W--(++) N+ o+ !K w---$ O M- V? PS+ PE Y+ PGP t 5++ X+ R++ tv b+ DI++++ D G e* h+ r y+