in reply to matching regex on an array element w/o looping the array
As sauoq pointed out, though, this does iterate over the list. It's hard to search through a list without iterating :) But grep is your friend. Learn it, love it.for (grep /.*P.*\.0912\.ama\.gz/, @sourcefiles) { # $_ contains each matching name }
|
|---|