in reply to Small question: Why can't I print "@-"?
You can interpolate both arrays, but you have to do so at the right time
print "@-:@+" while 'the quick brown fox jumps over the lazy dog' =~ /(\b.+?\b)(.+ +?)\b/g 0 0 3:4 3 4 4 4 9:10 9 10 10 10 15:16 15 16 16 16 19:20 19 20 20 20 25:26 25 26 26 26 30:31 30 31 31 31 34:35 34 35 35 35 39:40 39 40 print "@-:@+" :
Both arrays are reset before a new match is attempted, so when the match fails, they contain nothing to interpolate.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Small question: Why can't I print "@-"?
by Not_a_Number (Prior) on Sep 23, 2003 at 19:58 UTC | |
by thelenm (Vicar) on Sep 23, 2003 at 21:33 UTC | |
by BrowserUk (Patriarch) on Sep 23, 2003 at 20:04 UTC |