Hope you are getting what you require.. If not, what you expect the result to be?
With Best Regards, Karthikeyan S Honeywell Process Solutions - eRetail Honeywell Automation India Limited Phone:91-20-56039400 Extn -2701 Mobile :(0)9325118422 E-Mail: [EMAIL PROTECTED] This e-mail, and any attachments thereto, are intended only for use by the addressee(s) named herein and contain Honeywell confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying which amounts to misappropriation of this e-mail and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify me and permanently delete the original and any copy of any e-mail and any printout thereof. -----Original Message----- From: Dax Mickelson [mailto:[EMAIL PROTECTED] Sent: Monday, November 28, 2005 12:05 PM To: beginners@perl.org Subject: Pattern Matching Question I am having problems matching ALL possible matches of a string against another (very large) string. I am doing something like: @LargeArray = ($HugeString =~ m/$Head......../ig); Where $Head is an 8 character string. (Basically I want to get all 16 character long substrings out of $HugeString where the first 8 characters match $Head.) My problem comes about when (for example) I want to match a 16 character string that starts with AAAAAAAA. Suppose $HugeString=AAAAAAAAAASDFGHJKL and $Head=AAAAAAAA I want @LargeArray[0]=AAAAAAAAAASDFGHJ, @LargeArray[1]=AAAAAAAAASDFGHJK, and @LargeArray[2]=AAAAAAAASDFGHJKL Right now I would only get @LargeArray[0]=AAAAAAAAAASDFGHJ What am I doing wrong? How do I get all matches? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>