in reply to I'm banging my head with simple trick

You're surely better off using open("|..."), especially considering the problem is probably in the argument passed to echo. (quotes, new lines, other shell special characters?)

$text = "lots of text\n" x 150; $filename = 'FILENAME.WAV'; open(TEXT2WAVE, '|text2wave -eval "(voice_cmu_us_slt_arctic_hts)" -sca +le 1.5 -F 8000 -o ' . $filename . ' - ') or die("Can't execute text2wave\n"); # Autoflush TEXT2WAVE: { my $f = select(TEXT2WAVE); $|=1; select($f); } print TEXT2WAVE ($text); close(TEXT2WAVE);