in reply to Re^5: Assignable Subroutines
in thread Assignable Subroutines
If it's just combining two setters into one call, ...
How on earth did you reach that conclusion?
This syntax is standard perl and works now. Is my use of [] so confusing?
You've never used
?substr( $buffer, $n, $m ) =~ s[this][that]g;
Note, this might be direct access to an internal buffer, but it could equally be a subset of a bigger than memory file, or a BLOB queried from a DB.
The problem is that, you cannot do anything afterwards.
So, for example, in the latter case, you could not arrange for the modified BLOB to be written back to the DB.
Of course, the alternative syntax is:
my $temp = $obj->get_thing( 15000, 20000 ); $temp =~ s[this][that]g; $obj->set_thing( 15000, 200000, $temp );
which besides the:
Did you notice the typo?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Assignable Subroutines
by Tanktalus (Canon) on Jan 25, 2005 at 16:41 UTC | |
by BrowserUk (Patriarch) on Jan 25, 2005 at 17:28 UTC | |
|
Re^7: Assignable Subroutines
by demerphq (Chancellor) on Jan 25, 2005 at 16:32 UTC | |
|
Re^7: Assignable Subroutines
by perrin (Chancellor) on Jan 25, 2005 at 17:44 UTC | |
by BrowserUk (Patriarch) on Jan 25, 2005 at 18:09 UTC | |
by perrin (Chancellor) on Jan 25, 2005 at 21:00 UTC |