$in1 =~ s/\s+//g;
Although your comment suggests you are aware, I will still point out that s/\s+//g will remove all spaces, including spaces between digits/other characters, not just leading and trailing spaces.
While unlikely to be a problem with your program, it is still possible to feed an unexpected value:
yourprog "1 2"would result in $in1 being 12 and $in2 being empty
In reply to Re^3: Using number "0" as an input argument
by RonW
in thread Using number "0" as an input argument
by Doozer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |