Re: regex questions

2002-07-26 Thread John W. Krahn
Eric Plowe wrote: > > Hello all. Hello, >I am working on a script that searches through a text file - each > 'record' within the text file is separated by a - so for example: > > - > Fancy Car > > text text > text text > - > > and so on and so on. > > the first initial row of text is wh

Re: regex questions

2002-07-26 Thread Tanton Gibbs
You might do something like this: #!/usr/bin/perl -w use strict; # good to see you are using -w and strict...way to go! my $filename = "somefile"; # rename bit to found to be more descriptive my $found = 0; my $search = $ARGV[0]; # that should be $! ...you had !$ I suspect typo. open(FILE,