[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)
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