[NTLUG:Discuss] Perl help

Michael Barnes barnmichael at gmail.com
Tue Feb 5 16:10:21 CST 2008


I'm looking for a quick perl script and my brain just isn't
functioning right now.

I have a folder full of audio files.  Each file is a five digit
number.wav, i.e. 12345.wav.

Files are entered in this folder into particular groups of numbers, so
there are lots of gaps.

I need to search a range of these files from 31000.wav to 31500.wav
(ignoring everything below 31000 and above 31500) and find the largest
available file number to use.  There may be files 31000.wav-31057.wav
in use,  (There would be no files 31058-31500) making 31058 the next
available file.

All I need to do is get the next number (31058 in this case) into a
variable to be used elsewhere.

I know this should be quite easy, but I sure can't get my head around
it right now.

Thanks for any help you can come up with.

Michael



More information about the Discuss mailing list