in reply to Inputing an Operator is it possible?
with the extra chomp there to get rid of your record input separator, (newline by default) so that you have control over where your newlines go when you print.chomp($operator = <STDIN>);
print $a + $b, "\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
A reply falls below the community's threshold of quality. You may see it by logging in. |