[Perldl] "Can't modify non-lvalue subroutine call"

vine xf xf929292 at gmail.com
Tue Mar 25 13:24:02 HST 2014


I got an error message while using PDL(2.007, ActivePerl5.16), but don't
why. Here's a simplified example:

everything's ok for this code:
use PDL;
$a = sequence(5,6);
$b = $a->reorder(1,0);
$b .=0;   # $a is all zeros now.

but this code doesn't work:
use PDL;
$a = sequence(5,6);
$a->reorder(1,0) .= 0; #Can't modify non-lvalue subroutine call at - line
3, ...

But methods like ->splice(...) could be assigned to without any problem. Is
there a subset of PDL method which can't be assigned to just like reorder()?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.jach.hawaii.edu/pipermail/perldl/attachments/20140326/1ec69235/attachment.html>

More information about the Perldl mailing list