programming-examples/perl/Subroutine/Scalar and list Context.pl
2019-11-15 12:59:38 +01:00

6 lines
137 B
Perl

print "What is your full name? ";
($first, $middle, $last)=split(" ", <STDIN>);# STDIN scalar context
print "Hi $first $last.\n";