[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing to /dev/dsp in Perl
At 09:06 AM 7/2/97 -0600, Yaniv Orenstein wrote:
>Try $ret = open (AUDIO, "|/dev/dsp");
>
No, it won't work. When you use the "|..." syntax perl starts an executable
file and lets you write to its standard output. I.e:
open(MAIL, '|/usr/sbin/sendmail shlomi@slink.co.il');
Since /dev/dsp is not an executable but a named character file, it won't
do. However, the
$ret = open (AUDIO, "|cat > /dev/dsp");
syntax might work, but I may not hear the sound coming till I close the
AUDIO file handle.
Maybe I'll do some expereminting on it this evening and let you guys know
what happen later on. If not, maybe I should post the original message to
comp.lang.perl.misc or something.
Shlomi Fish
----------------------------------------------------------
Shlomi Fish Smart Link Ltd.
Home: shlomif@ibm.net
Work: shlomi@slink.co.il
The Bible dictates that "Thou shalt not seethe [=cook] a kid [= young goat]
in his mother's milk." To avoid possibility of breaking that regulation,
the Jewish tradition ruled that it also applies to female goats, to mature
goats, and to the meat and milk of two completely unrelated goats. It is
also forbidden to eat the meat with fresh milk, and it applies to beef and
mutten as well (including mixing the milk and meat of two different
beasts). Finally, chicken, which are incapable of milk production, may not
be eaten along with any mammal's milk either.
We are fortunate that most mathematicians were not Jewish. Otherwise, it
would have been forbidden to divide by all numbers between -1 and 1.
----------------------------------------------------------
Follow-Ups:
References: