Either you get all 3 numbers separated by spaces on one line, chomp it once and then you have to use
split or some other mechanism to get the individual numbers (the way I did it in my previous post),
or you ask three times for one indivudal number from your user, get three times the input, chomp the input three times.
print "give me a number\n";
my $nr1 = <>;
chomp $nr1;
print "give me a number\n";
my $nr2 = <>;
chomp $nr2;
print "give me a number\n";
my $nr3 ...