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

12 lines
161 B
Perl
Raw Normal View History

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