#!/usr/bin/perl
print "===================================================\n";
print "Perl calculator by Mourat Djoussoupov / Novosibirsk\n";
print "===================================================\n";
print "\n";
$x = 0;
$y = 0;
$oper = "";
print "ENTER first number:\n";
print "> ";
$x = <STDIN>;
chomp ($x);
print "ENTER operation +, -, *, /:\n";
print "> ";
$oper = <STDIN>;
chomp ($oper);
print "ENTER second number:\n";
print "> ";
$y = <STDIN>;
chomp ($y);
if ($oper eq "+") {$result = $x + $y;}
elsif ($oper eq "-") {$result = $x - $y;}
elsif ($oper eq "*") {$result = $x * $y;}
elsif ($oper eq "/") {$result = $x / $y;}
print "===================================================\n";
print "$x $oper $y = $result\n";
print "===================================================\n";