in reply to code example from Audio::OSS doc fails?

Did you try adding:
use IO::Handle;
at the top?

Replies are listed 'Best First'.
Re^2: code example from Audio::OSS doc fails?
by bcrowell2 (Friar) on Dec 15, 2010 at 20:58 UTC

    Thanks for the reply :-)

    If I do that, I get this:
    usage: new IO::Handle at a.pl line 4

    If I then do this:

    use IO::Handle; use Audio::OSS qw(:funcs :formats :mixer); my $dsp = new IO::Handle("</dev/dsp") or die "open failed: $!";
    I get the same error.
      Maybe try changing IO::Handle to IO::File.
        Thanks, johna -- much appreciated!