in reply to Pattern match location finding
Examine $-[0] for the start location of your match. This will not help you if you wanted to use the /g switch in list context so there you have to fudge.
my @offsets; while ( /B/g ) { push @offsets, $-[0]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Pattern match location finding
by feloniousMonk (Pilgrim) on Feb 18, 2004 at 23:15 UTC | |
by diotalevi (Canon) on Feb 19, 2004 at 00:01 UTC | |
by flounder99 (Friar) on Feb 19, 2004 at 02:13 UTC | |
by diotalevi (Canon) on Feb 19, 2004 at 04:52 UTC |