programming-examples/perl/String/Type four characters with chomp.pl
2019-11-15 12:59:38 +01:00

12 lines
161 B
Perl

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