This is a user group of other people like yourself who use DBI.  It is not a
support line.  Please bear that in mind.

The first thing I would look at is your open() statement.  There are lots of
things wrong with it.
a)  determine the uid separately and store it in a string, before the open()
call.
b)  don't use awk; use perl.  Perl is more powerful than awk for string
processing.
c)  don't grep plain text out of .gz files.

Perhaps you need to work on an introductory Perl book before delving into
DBI.

-Will


-----Original Message-----
From: Uthayakumar Paulraj [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 November 2005 03:00
To: [email protected]
Subject: Regards: grep: writing output: Broken pipe


Dear Sir/Madam,

I am using DBI module in my perl script. And also i am using the grep
utility along with awk. This utility works fine when we are not initialize
the DB connection. If we initialize the DBI connection it throws the error
"grep: writing output: Broken pipe"

$dbh=DBI->connect("DBI:mysql:dbname","dbuser","dbpwd"); ### if we comment
this line, works fine; uncomment this line, gives error "grep: writing
output: Broken pipe"

open(FH,"grep -Z '' *.gz | awk 'BEGIN {flag=0;}{if(\$1~/$uid/){print
'\$1';flag=1;}else {if(flag==1){exit;}}}'|");
while(<FH>) {
 print $_."\n";
}


I kindly request you to overcome this issue.

Thansk and Regards
uthayakumar.p


     - - - - - - -  Appended by Scientific-Atlanta, Inc.  - - - - - - -  
This e-mail and any attachments may contain information which is confidential, 
proprietary, privileged or otherwise protected by law. The information is 
solely intended for the named addressee (or a person responsible for delivering 
it to the addressee). If you are not the intended recipient of this message, 
you are not authorized to read, print, retain, copy or disseminate this message 
or any part of it. If you have received this e-mail in error, please notify the 
sender immediately by return e-mail and delete it from your computer.

Reply via email to