in reply to can't modify anonymous hash ({}) in scalar assignment

"$self=>{ettx} = {};"

Apart from I cannot see that particular line in the code you've posted; if it is there, it should probably be:

$self->{ettx} = {}; .....^

Update: Ah! You probably mean:  $self=>{ettx} = $xml->XMLin(shift); which should be:

$self->{ettx} = $xml->XMLin(shift); ......^

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^2: can't modify anonymous hash ({}) in scalar assignment
by Anonymous Monk on Jul 26, 2010 at 15:30 UTC

    Yes, I apologize. I wrote the post and then deleted lines of code I had inserted for debugging but were not necessary for this. The line you mention was the problem one.

    And you were right about the syntax, too!. I thought => was for pointers and -> was for subs. I guess I should google that.

    Thanks!

      Comma Operator
          The "=>" operator is a synonym for the comma except that it causes its
          left operand to be interpreted as a string if it begins with a letter or
          underscore and is composed only of letters, digits and underscores.
      
      The Arrow Operator
      
          ""->"" is an infix dereference operator, just as it is in C and C++. If
          the right side is either a "[...]", "{...}", or a "(...)" subscript,
          then the left side must be either a hard or symbolic reference to an
          array, a hash, or a subroutine respectively. (Or technically speaking, a
          location capable of holding a hard reference, if it's an array or hash
          reference being used for assignment.) See perlreftut and perlref.
      
          Otherwise, the right side is a method name or a simple scalar variable
          containing either the method name or a subroutine reference, and the
          left side must be either an object (a blessed reference) or a class name
          (that is, a package name). See perlobj.