From 990ca11c40881d6c4c407007b045d66b61d979d9 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 18 Aug 2021 01:43:03 +0200 Subject: incdec: Add note for myself about what `@-` and `@+` mean Not what I was thinking when I wrote that looping code. --- incdec.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'incdec.pm') diff --git a/incdec.pm b/incdec.pm index 53295e0..19fb951 100644 --- a/incdec.pm +++ b/incdec.pm @@ -45,6 +45,7 @@ sub incdec { $point_position = $original_point_position; my @matches = $line =~ /(\d+)/g; print "[[@matches]]"; + # TODO: @- and @+ hold a list of captured groups. You need to loop through matches to get positions for each match with $-+[0]. It doesn't give you a list of positions of all matches. print "-[[@-]]-.+[[@+]]+"; # for (my $i = 0; $i < scalar @+ - 1; $i++) { # print "..$-[$i]:$+[$i]..$point_position.."; -- cgit v1.2.3