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