1 until $WAV->Status(); is perfectly-valid perl; it's using the Statement Modifiers syntax rather than the Compound Statements syntax. I didn't come up with most of that example: except for the for loop at the end, it's verbatim from the Win32::Sound documentation, specifically their EXAMPLE at the end: everything until the ############ was theirs, not mine, and should work. That line, specifically, is saying "loop doing nothing (1 is a noop, in that case) until $WAV->Status() is true"; that status will go true when the wav is done playing.
If it's not working, there's something wrong with your perl installation or Win32::Sound installation on your machine.
Are using Strawberry Perl, ActiveState, cygwin, or WSL (Windows Subsystem for Linux)? The full output of perl -V (that's a capital V) might help us debug what's going wrong, along with perl -MWin32::Sound -le "print $INC{'Win32/Sound.pm'}; print $Win32::Sound::VERSION".
In reply to Re^4: Playing wav files
by pryrt
in thread Playing wav files
by merrymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |