Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-11-23 05:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (328 votes). Check out past polls.

    Notices?