Taking strnig as input for calculator program in Perl
问题 I am new to Perl and I'm trying to create a simple calculator program, but the rules are different from normal maths. All operations have the same power and the math problem must be solved from left to right. Here is an example: 123 - 10 + 4 * 10 = ((123 - 10) + 4) * 10 = 1170 8 * 7 / 3 + 2 = ((8 * 7) / 3) + 2 = 20.666 So in the first case the user needs to enter one string: 123 - 10 + 4 * 10. How do i approach this task? I'm sorry if it's too much of a general question, but i'm not sure how