in reply to calculator help
This is especially important for the operation ($opr1 variable), that will never be equal to "+" (for example) if you don't chomp it, but more probably to things like "+\n" (under Unix) or "+\r\n" (under Windows) or something else (on Mac, I don't know for sure, it used to be "+\r", but I think it has changed some times ago and is probably like Unix nowadays). Anyway, whatever the trailing character(s) is not so important, the point is that you should remove it using the chomp function.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: calculator help
by GrandFather (Saint) on Jun 03, 2014 at 10:28 UTC | |
by Laurent_R (Canon) on Jun 03, 2014 at 17:52 UTC | |
by GrandFather (Saint) on Jun 04, 2014 at 00:50 UTC |