Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Reading command output bufferby starbolin (Hermit) |
on May 10, 2008 at 02:21 UTC ( [id://685818]=note: print w/replies, xml ) | Need Help?? |
Yes it's a syntax error. In your open() statement $cmd is interpolated into a flat list before being sent to open(). So you opened a file "mysqldump" instead of a pipe. To fix this put parenthesis around $cmd. open MYSQLDUMP, "$cmd" or die $!;
Update: Open() will only fork a shell if it needs to process shell meta-characters. So, open probably ok here. s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
In Section
Seekers of Perl Wisdom
|
|