You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ken Williams <ke...@forum.swarthmore.edu> on 2000/07/13 22:21:17 UTC

Re: [OT] Damian Conway book example (is the bug mine or his?)

Please remember, this is the mod_perl list.  Followup to a different
list if this doesn't answer your question, please.


rtanner@onlinemac.com (Rob Tanner) wrote:
>     Can't modify single ref constructor in scalar assignment at \
>            accntREQUEST.cgi line 154, near ");"
[...]
>my $colleague = {};
>@{$colleague} = { "status",
>		  "id",
>		  "last_name",
>		  "first_name",
>		  "middle_name",
>		  "campus",
>		  "dob"
>		 } = split(/:/, $record);


...and that's exactly what you're doing, assigning to a single ref
constructor.  Just like saying the following, which is a syntax error:

  {one => 1} = (2,3);



You mean:

my $colleague = {};
@{$colleague}{"status",
              "id",
              "last_name",
              "first_name",
              "middle_name",
              "campus",
              "dob"
             } = split(/:/, $record);


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  ken@forum.swarthmore.edu                            The Math Forum