in reply to Re: 'grouping' substrings?
in thread 'grouping' substrings?

Yes, don't mind what I wrote, it was just an example... will try your code ASAP. Will also check index function.. thanx to both of you!

Replies are listed 'Best First'.
Re^3: 'grouping' substrings?
by Anonymous Monk on Feb 01, 2006 at 16:21 UTC
    Sorry to bother you again, but it doesn't seem to work. For example, the first group gives 5-16, while it should be 5-15, the second 32-45, while it should be 32-44 from what I can calculate... Are my maths poor??? Also, I can't understand what [$-[0], $+[0]] mean... Any tips ? Sorry, I'm just beggining Perl...
      I hope this isn't too obvious, but how about subtracting one from $+[0]?

      Updated per ikegami's reply - duh! I have a bad track record lately...
        --$+[0] doesn't work ("Modification of a read-only value attempted"), but $+[0] - 1 will.

      [ ... ] means "Construct an array with '...' as content, and return a reference to it." This is documented in perlref.

      $-[0] and $+[0] are elements of the special arrays @- and @+. Refer to perlvar for more information.