title: How to pass correctly variable to and from called function?
body: <p>I have implemented a class called cell and trying to store a char to it.
  I find that there is a problem to retrieve the char with my setter and getter.</p>
  
  <pre><code>#This is the detail of the class:      
  package Cell;
  sub new{
    my $class = shift;
    my $self = {  
      content =&gt; -1,
    };
    return bless $self, $class;
  }
  
  #This is my setter and getter  
  sub setContent{
    my ($self,$ch) = @_;
    $self-&gt;{content} = $ch;
    print("stored char".$self-&gt;{content}."\n");
  } 
  
  sub getContent{
    my $self = @_;
    print("passing back char".$self-&gt;{content}."\n");
    return $self-&gt;{content};  
  } 
  
  # this is the way i used the class
  my $ch = "a";
  my $cell = Cell-&gt;new();
  $cell-&gt;setContent($ch);     
  my $testvar = $cell-&gt;getContent();
  print("test start\n".$testvar);
  print("test end\n");
  #
  </code></pre>
  
  <p>I find that I am able to pass the char to the setter and should be stored in $self->{content}, but when trying to retrieve char using getter,  $self->{content} become empty</p>