Brian Poellnitz wrote: > > 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?
grep { /_${feed_date}_/ && /\.wav$/ } @dir_files; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>