#!/usr/bin/perl -l use strict; use Audio::Wav; use Audio::Scan; use Data::Dumper::Concise; my $file = '/root/Desktop/explode.wav'; my $info = Audio::Scan->scan_info( $file ); print Dumper( $info ); my $wav = new Audio::Wav; my $read = $wav->read( $file ); my $audio_seconds = $read->length_seconds(); print "Total number of seconds: ", Dumper( $audio_seconds );