OK here goes... 

The sample data below is read into a list, @dir_files.  What I'd like to do is 
grep() the list so that I'm left with only files that end in ".wav" and contain 
certain string.  The "certain string" is where I run into problems.  Something 
like

grep(/.*\.wav/)

works fine for getting the items with .wav extensions.  What I'd like to do is 
also filter for the existence of a string held in the variable $feed_date (In 
my test case, $feed_date = "9mar").  I've tried something like

grep(/.*($feed_date).*\.wav/)

but with no luck.  My resultant list is empty.  Can someone nudge (shove?)  me 
in the right direction?


------SAMPLE DATA in @dir_files-----

tns_16Mar_IrishAncestral.mp2
tns_16Mar_IrishAncestral.wav
tns_16Mar_short.mp2 
tns_16Mar_short.wav
tns_23Feb_MusicalMeltdown.mp2
tns_23Feb_MusicalMeltdown.wav
tns_23Feb_short.mp2
tns_23Feb_short.wav
tns_2Mar_NorlandWind.mp2
tns_2Mar_NorlandWind.wav
tns_2Mar_short.mp2
tns_2Mar_short.wav
tns_9Mar_SillyWizard.mp2
tns_9Mar_SillyWizard.wav
tns_9Mar_short.mp2
tns_9Mar_short.wav

---END SAMPLE DATA---

I want to end up with :

tns_9Mar_SillyWizard.wav
tns_9Mar_short.wav




=====================================
Brian Poellnitz
-Production Coordinator: Alabama Public Radio
-On Air Host: A Case Of The Blues

205-348-8026 (my desk)
205-348-6644 (APR main number)
[EMAIL PROTECTED]

Alabama Public Radio
Box 870370
University of Alabama
Tuscaloosa, AL 35487
============================================

Tact is the unspoken part of what you're really thinking.

============================================


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to