in reply to unitialized value error in pattern matching script
Something like the following should work assuming that @myfile has been defined to be an array and contains the required filenames.
Now another problem is that you seem to want to extract some substrings from the matched string by your use of parens in the regex yet it is unclear what you're trying to do here since you already know that the pattern is 'Hare.java' or is it?for (@myfile) { if (/$filename/) { print "Found pattern.\n"; } }
metadoktor
"The doktor is in."
|
|---|