in reply to
Sliding window
This can help you to implement the sliding window:
$s = "abcdef"; print "$1,$2\n" while $s =~ /(.)(?=.(.))/g;
[download]
Update:
Using
while
instead of
for
to simplify getting the pairs.
Comment on
Re: Sliding window
Select
or
Download
Code
In Section
Seekers of Perl Wisdom