On 10/14/2014 10:06 AM, H.Merijn Brand wrote: > On Tue, 14 Oct 2014 15:43:40 +0100, "Paul \"LeoNerd\" Evans" > <leonerd@leonerd.org.uk> wrote: > >> On Tue, 14 Oct 2014 08:47:15 -0400 >> Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote: >> >>> Also, we have LVALUE refs. Is this feature actually >>> related to that? >> The things we have that are called LVALUE are the lvalues returned by >> the substr() function so that mutations of it can affect the original: >> >> my $str = "Hello world"; >> substr( $str, 0, 5 ) = "Goodbye"; <== assignment to an LVALUE > is that (internally) different from using the 4-arg form (which I > prefer because it is much faster)? If you use the lvalue returned only once, no. But: $ perl -E 'my $str = "Hello"; for(substr($str,1,1)) { say $_; $_="ee"; say $str; $_ = "aaa"; say $str }' e Heello Haaallo --- sortizThread Previous | Thread Next