Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Inputing an Operator is it possible?

by krusty (Hermit)
on Oct 07, 2002 at 03:12 UTC ( [id://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";


Cheers,
Kristina

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-23 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found