programming-examples/perl/Subroutine/Scalar and list Context.pl

6 lines
137 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
print "What is your full name? ";
($first, $middle, $last)=split(" ", <STDIN>);# STDIN scalar context
print "Hi $first $last.\n";