title: Why does Perl complain "Can't modify constant item in scalar assignment"?
body: <p>I have this Perl subroutine that is causing a problem:</p>
  
  <pre><code>sub new
  {
      my $class = shift;
  
      my $ldap_obj = Net::LDAP-&gt;new( 'test.company.com' ) or die "$@";
  
      my $self = {
                  _ldap = $ldap_obj,
                  _dn ='dc=users,dc=ldap,dc=company,dc=com',
                  _dn_login = 'dc=login,dc=ldap,dc=company,dc=com',
                  _description ='company',
                  };
  
      # Print all the values just for clarification.
      bless $self, $class;
  
      return $self;
  }
  </code></pre>
  
  <p>what is wrong on this code : </p>
  
  <p>i got this error <strong>Can't modify constant item in scalar assignment at Core.pm line 12, near "$ldap_obj,"</strong></p>