in reply to Re: Pattern Match in @array
in thread Pattern Match in @array

I may be going against the advice of mirod : "correct a mistake by a high-ranking monk: yeah, like anybody's going to believe you!" but oh well : )

Actually, I believe (I may be wrong, it wasn't too clear), that the poster has an array of files, and he wants to check each one against a pattern, and if it doesn't match, then he will make the file. If the first file in the area of your example is good, the whole thing stops. Merely change that last to a next, and open the file right after you write next:

for (@files) { next if /pattern/; #file didn't match pattern, so create it open(FH,">$_"); #do something with FH }

The 15 year old, freshman programmer,
Stephen Rawls