How would I go about writing a Perl Progam that can take user entered lines from the keyboard and then store them in an array?
Whenever the user enters "QUIT" the program will print out all of the lines sorted. THen you must change the program so that it will tell you how many lines have entered and then print out only lines 2, 3, and 4.
Anthony Cameron -2 Light Poster
Recommended Answers
Jump to PostAt least post what you have ok?
some code will you ;)
Jump to PostThats easy.
You must have a file to write append your entered data.
Once you quit, You read the size, print 2,3,4lines from the file.
That is any entered input by the user is stored append to the file.
Simple ;)
Jump to PostI wonder Why would you want to use
$takeIn=<>; chomp $takeIn; @d=$takeIn
instead of:
@d=<>; chomp @d;
All 11 Replies
masijade 1,351 Industrious Poster Team Colleague Featured Poster
richieking 44 Master Poster
Anthony Cameron -2 Light Poster
richieking 44 Master Poster
Anthony Cameron -2 Light Poster
richieking 44 Master Poster
Anthony Cameron -2 Light Poster
richieking 44 Master Poster
richieking 44 Master Poster
sysadm1n 2 Newbie Poster
Anthony Cameron -2 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.