Re: regex doubt

2003-04-12 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > Hi all, > > i have a set if keywords which i have to search for in the lines > beginning with character 'A' in the "file". > snippet follows - > > #!/usr/bin/perl -w > $keywords = "hello|world|all|chipset"; > open FH,"file"; > while() > { > print if(/^A/ && /(?:$keyword)

regex doubt

2003-04-12 Thread km
Hi all, i have a set if keywords which i have to search for in the lines beginning with character 'A' in the "file". snippet follows - #!/usr/bin/perl -w $keywords = "hello|world|all|chipset"; open FH,"file"; while() { print if(/^A/ && /(?:$keyword)/g); } close FH; is that correct or any other