>>>>> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:

  LW> On Mon, May 09, 2005 at 12:14:35PM -0700, Larry Wall wrote:
  LW> : On Mon, May 09, 2005 at 02:08:31PM -0500, Patrick R. Michaud wrote:
  LW> : : Hmmm, then would $x.$j.2 then be equivalent to $x[$j-1][1] ?  
  LW> : 
  LW> : Ouch.

  LW> Maybe that's a good reason to switch from 1-based to 0-based
  LW> $<digit> vars.  Not sure what that would do to the current $0 though.
  LW> Most of the time $/ can stand in for it, I guess, though s/.../$//
  LW> is visually problematic.  We could maybe resurrect $&.

or do what i mentioned, not allow mixing of the two styles of match
access. i don't see any real win for mixing them. indexing into matched
arrays will not be so common to deserve conflating the 0 and 1 based
indexing as well as the notations. leave it with $1.1 and $1[0] as being
the two styles. you must use literal integers with the former and it is
1 based. you can use any expressions with the latter and it is 0
based. by allowing $1[$j].1 you save only 1 char over $1[$j][0] and
would cause major confusion IMO.


Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to