use strict; use Audio::Wav; use Cwd; use Data::Dumper; my $path = getcwd; my $wav = new Audio::Wav; my $test = 'test.wav'; my $read = $wav -> read($test); my $details = $read -> details(); print Data::Dumper->Dump([ $details ]); my $total = 0; my $buffer = 2; my $length = $read -> length(); while ( $total < $length ) { $total += $buffer; my $data = $read -> read_raw( $buffer ); my $value = unpack('s',$data); my $sample = $total/2; print "\nsample $sample value $value "; }