Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Basic I/O #1

by pedagogues
on Nov 17, 1999 at 03:02 UTC ( #995=perlsolution: print w/ replies, xml ) Need Help??
   1: # prompt for and read First and Last name, then print a welcome message.
   2: 
   3: print "\nWhat is your first name? ";
   4: my $first = <>;
   5: 
   6: print "\nWhat is your last name? ";
   7: my $last = <>;
   8: 
   9: chomp $first; # strip the newline from the first name
  10: 
  11: print "Welcome $first $last";

go back to Basic I/O Exercises



Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2015-07-01 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (24 votes), past polls