in reply to Re: Re^3: [substr] anomaly or mine?
in thread [substr] anomaly or mine?
Well, @a[1..3]= "x" is the same as @a[1..3]= ( "x", undef, undef ), and so this seems reasonable to me. [ Note that scalar context changes things since list assignment is documented to return the number of items in the right-hand-side list when evaluated in a scalar context so 1 == scalar( @a[1..3]= "x" ). ]
If there were a way to assign to some kind of variable-length array slice, then we could make a more appropriate comparison between it and the substr "bug" case.
- tye (but my friends call me "Tye")
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (tye)Re2: [substr] anomaly or mine?
by BrowserUk (Patriarch) on Aug 20, 2002 at 01:09 UTC |