SPUG: refs to substrings contain lvalues

David Dyck david.dyck at fluke.com
Sat Jul 31 08:50:49 CDT 2004


On Fri, 30 Jul 2004 at 20:50 -0700, Aaron W. West <tallpeak at hotmail.com> wrote:

> $ perl -le '$x="stargazing";
> $y=\substr($x,0,4);
> print $y;
> $$y="sun";
> print $x;
> print $$y
> use Data::Dumper;
> print Dumper($y)'
>
> Output:
> LVALUE(0x10101570)
> sungazing
> sung
> cannot handle ref type 9 at /usr/local/lib/perl5/5.8.4/cygwin/Data/Dumper.pm
> line 158.
>
> Dumper doesn't know how to handle refs to substrings, apparently.


Funny, I get

"use" not allowed in expression at -e line 7, at end of line
syntax error at -e line 7, near "$y
use Data::Dumper"
Execution of -e aborted due to compilation errors.

 Perhaps it's the missing semi-colon after the print $$y    :-)

Did you submit a perlbug on it yet?



More information about the spug-list mailing list