R
Ryan McCoskrie
I've been working on a little Polish notation
calculator / interpreter just to get some
idea of how to deal with these issues.
However my design pins on having a package
that describes a sum including all of the numbers
in it and the perl interpreter won't accept this:
@self->{num} = []; #my list of numbers
.... #skip boring bit where the numbers are read in
#and check to be numbers
push @self->{num}, @input; #@input is the numbers
What I get is this:
Type of arg 1 to push must be array (not hash element) at
sum.pm line 16, near "@input;"
calculator / interpreter just to get some
idea of how to deal with these issues.
However my design pins on having a package
that describes a sum including all of the numbers
in it and the perl interpreter won't accept this:
@self->{num} = []; #my list of numbers
.... #skip boring bit where the numbers are read in
#and check to be numbers
push @self->{num}, @input; #@input is the numbers
What I get is this:
Type of arg 1 to push must be array (not hash element) at
sum.pm line 16, near "@input;"