in reply to Match a chunk
Line 3 doesn't make sense to me. Why the 'g' option? Do you expect there to be more that one instance of a member of @updateloc1 contained in any given member of @textlines? Also, it would seem, for your dataset, line 3 would always fail as $update would always be a longer string than $lin.(1) foreach my $update (@updateloc1){ (2) for my $lin (@texlines){ (3) if ($lin =~ /$update/g){
I have to admit I don't understand what you are trying to do. What is your expected output? Is the data always in order like the example? Are there multiple matches in the array?
s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Match a chunk
by dhasaan (Initiate) on Jun 12, 2008 at 10:06 UTC | |
by Anonymous Monk on Jun 12, 2008 at 11:25 UTC |
In Section
Seekers of Perl Wisdom