dragonchild has asked for the wisdom of the Perl Monks concerning the following question:
I've want to capture every pair of letters in a string, but I can't seem to get it to work.
I want it to print out "bl la ah", but, to capture the second level, I need to put another set of capturing parentheses within the lookahead. But, this puts the second character in $2, not $1 like I want to.$_ = "blah"; my @matches = /(.(?=.))/g; print "@matches\n";
Help!
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
Back to
Seekers of Perl Wisdom