programming-examples/perl/String/Type four characters without chomp.pl

11 lines
145 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
print "Please type four characters...\n";
for (1 .. 4) {
$char = <>;
$word .= $char;
}
print "You typed: " , $word;