hi,
i'm taking my intro perl course, and am working on the first lab. i've got it all done with one last outstanding problem in my perl program.
the program takes in one or two integers per line, which may be signed. after you type "quit", it will return the average of all the integers entered.
right now, it will take in one or two integers per line, as it should, and it will correctly add in the unsigned ints and the positive signed ints for calculation. the last part, and the part that does not work, is taking in the negative signed ints and subtracting them in the calculations.
when it encounters a negative signed int, it gives this error:
Use of uninitialized value in subtraction (-) at Lab1_2.pl line 22, <STDIN> line 1.
the code is as follows. i will greatly appreciate any insight you guys may have to help me! in addition to fixing my problem, it'd be great if you guys might be able to give me pointers on my code and style. thanks in advance!!