![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re: Re: Re: Cropping the output of the pattern matcherby hopes (Friar) |
on Sep 24, 2001 at 05:14 UTC ( [id://114230]=note: print w/replies, xml ) | Need Help?? |
It seems as the delimiters were deleted, but the print is a little tricky First, you had the string:
and you did
What did it make? This code "splits" the string, searching '><' as delimiter. Because of '><' is not matched in the string, in @bits_and_pieces you will have only one element, and it would be (all the string) In the other hand, you did this
Then, perl searches '><' in the string and splits it into an array. So @bits_and_pieces would be now
If you print @bits_and_pieces with is printed as if the delimiters '><' where removed from the array. Hope this help Hopes
In Section
Seekers of Perl Wisdom
|
|