title: object return random number instead of a value in perl
body: <p>I have this PM class file:</p>
  
  <pre><code>use strict ;
  use warnings;
  
  package Math;
  
  
  sub new{
      my $class = shift;
      my $self = {};
      bless($self, $class);
      return $self;
  }
  
  
  sub add{
      my $x = shift;
      my $y = shift;
      return $x + $y;
  }
  
  sub substract{
  
      my $x = shift;
      my $y = shift;
      return $x - $y;
  
  }
  
  sub multiple{
  
      my $x = shift;
      my $y = shift;
      return $x * $y;
  }
  
  sub divide{
      my $x = shift;
      my $y = shift;
      return $x / $y;
  }
  
  1;
  </code></pre>
  
  <p>and I have the main test pl file:</p>
  
  <pre><code>use strict ;
  use warnings;
  use Math;
  
  my $math_action = new Math();
  my $number1 = 5;
  my $number2 = 3;
  my $results = $math_action-&gt;add($number1, $number2);
  print $results;
  </code></pre>
  
  <p>From some reason I am getting odd results randomly with each run.
  Probably something easy (?) I did not touch perl for long time, digging an hour to find solution could not find ...Any help will be appreciated.</p>