Scalar and list Context : Context « Subroutine « Perl






Scalar and list Context

   
print "What is your full name? ";

($first, $middle, $last)=split(" ", <STDIN>);# STDIN scalar context

print "Hi $first $last.\n";

   
    
    
  








Related examples in the same category

1.Return value based on context
2.Wantarray function.
3.Context and Subroutines