Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Inputing an Operator is it possible?

by krusty (Hermit)
on Oct 07, 2002 at 03:12 UTC ( #203241=note: print w/ replies, xml ) Need Help??

in reply to Inputing an Operator is it possible?

Placing your angle operator inside of double quotes treats it as a literal "less than" and "greater than" symbol...

Instead try:

chomp($operator = <STDIN>);
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.

Also if you want to add $a and $b instead of printing them out literally, try
print $a + $b, "\n";


Comment on Re: Inputing an Operator is it possible?
Select or Download Code
Replies are listed 'Best First'.
Re:^2 Inputing an Operator is it possible?
by $Variable_B on Oct 08, 2002 at 05:14 UTC
    I meant "<STDIN>" as quotes to show that is what we are talking about as an English. I am very sorry for confusing you with the string "". That is a good point you make and I will be more careful in the future to be more pacific on my meaning.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://203241]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2015-11-27 23:00 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (734 votes), past polls