great it's working fine
06/02/2006 05:24 PM
Irfan J Sayed/India/IBM@IBMIN
RE: searching word in script
Use '||' instead of '|'.
From: Irfan J Sayed
Sent: Friday, June 02, 2006 5:20 PM
Subject: RE: searching word in script
I modified the code as per suggession but still error
# Main program
my $file = "c:\\irfan\\cqcmd.txt";
open (FH, $file) | die "file can't open $! \n";
while ($line = <FH>)
if ($line =~m/foo/)
print "match found";
print "match not found";
Useless use of bitwise or (|) in void context at C:\irfan\search.pl line
file can't open Bad file descriptor
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s) and
may contain proprietary, confidential or privileged information. If you
are not the intended recipient, you should not disseminate, distribute or
copy this e-mail. Please notify the sender immediately and destroy all
copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.