in reply to Re^2: Is there a module for object-oriented substring handling/substitution? (2 substrs)
in thread Is there a module for object-oriented substring handling/substitution?
They long since lifted the 'only one lvalue ref' limitation. This is 5.10.1:
$s = 'abcdefghijklmnopqrstuvwxyz';; @r = map \substr( $s, $_*4, 2), 0..6;; $$_ = uc $$_ for @r;; say $s;; ABcdEFghIJklMNopQRstUVwxYZ say $];; 5.010001
It does have its limitations though. (Unsurprisingly) The lvalue refs do not adjust to accommodate replacements that alter the length of the string:
$$_ = $_ for @r;; say $s;; REF(REF(REF(REF(REF(REF(REF(0x3e82050)3e821e8)3e82260)3e820e0)11c458)3 +e820c8)335dc0)cdEFghIJklMNopQRstUVwxYZ
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Is there a module for object-oriented substring handling/substitution? (cooperate)
by tye (Sage) on Jan 25, 2013 at 03:15 UTC |
In Section
Seekers of Perl Wisdom