$|=1; # So it works in the IDE
$a = 6; # My number to guess

print "Guess the number!\n"; # Get the user input
$n = <STDIN>;
chomp $n;

if ($n > $a){ # Check the number and report the results to the user
  print "Your number is too high!\n";
}
elsif ($n < $a){
  print "Your number is too low!\n";
}
else { # Here it has to be $n == $a
  print "You guessed it!\n"
}
