Type four characters without chomp
print "Please type four characters...\n"; for (1 .. 4) { $char = <>; $word .= $char; } print "You typed: " , $word;