in reply to perl indication of end of string already matched
This sounds very much like an XY Problem. Can you give us a Short, Self-Contained, Correct Example to illustrate your immediate problem? In any event, is the following something like what you would want?
c:\@Work\Perl\monks>perl -wMstrict -le "my $str = 'abc'; while ($str =~ m/./gc) { printf qq{1: %d \n}, pos $str; } ;; printf qq{2: %d \n}, pos $str; print 'pos at end' if pos $str == length $str; " 1: 1 1: 2 1: 3 2: 3 pos at end
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl indication of end of string already matched
by nachumk (Initiate) on Jun 08, 2020 at 16:28 UTC | |
by AnomalousMonk (Archbishop) on Jun 08, 2020 at 19:43 UTC | |
by nachumk (Initiate) on Jun 08, 2020 at 21:58 UTC | |
by haukex (Archbishop) on Jun 08, 2020 at 22:37 UTC | |
by AnomalousMonk (Archbishop) on Jun 09, 2020 at 00:40 UTC | |
by haukex (Archbishop) on Jun 09, 2020 at 08:29 UTC | |
by rsFalse (Chaplain) on Jun 16, 2020 at 11:31 UTC |