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