We don't bite newbies here... much | |
PerlMonks |
It's Not Clear What You're Doing - Re: pattern matchingby metadoktor (Hermit) |
on Mar 29, 2002 at 02:43 UTC ( [id://155185]=note: print w/replies, xml ) | Need Help?? |
I think that your code has some really serious problems if you posted it without errors. I'm not sure what you're attempting with $_myfile[$i]? Perhaps you meant $_[$i] or $myfile[$i]? Also the regex you attempted does not have a trailing / (forward slash). Also the 'filename' variable you posted should be '$filename'.
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? metadoktor "The doktor is in."
In Section
Seekers of Perl Wisdom
|
|