- or download this
Use of uninitialized value in addition (+) at Parent.pm line 17.
Use of uninitialized value in addition (+) at Parent.pm line 17.
- or download this
package Parent;
...
my ($self,$val1,$val2) = shift;
$self->{val1} = $val1;
$self->{val2} = $val2;
- or download this
my $out = $self->{val1} + $self->{val2};
return $out;
}
...
$pObj=Parent->subtract(100); # subtracts 1 from 100 .
print Dumper $pObj;