in reply to Re^7: Executing functions from another process
in thread Executing functions from another process
The problem happens on the last line which errors out with Modification of a read-only value. Why is this the case?
Because the combination of the dump + eval equates to:
my @newD = ("one", "two", \"two");
Which means that $newD[ 2 ] is assigned a reference to the string literal "two"; and when you indirect through that reference, you are trying to modify that string literal.
With the other two elements of the array, new variables are created which are initialised to read-write copies of the string literals.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Executing functions from another process
by gri6507 (Deacon) on Jan 24, 2014 at 15:46 UTC | |
by BrowserUk (Patriarch) on Jan 24, 2014 at 16:29 UTC | |
by Corion (Patriarch) on Jan 24, 2014 at 16:41 UTC | |
by BrowserUk (Patriarch) on Jan 24, 2014 at 18:04 UTC |