in reply to newline issue

I can't figure out why there is a new line created

You think you entered "100", but you in fact entered "100\n". (Hitting the "Enter" button does that.)

Just chomp $price1; straight after <STDIN> has been assigned to it and the newline will be removed.

Cheers,
Rob