Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

File Input and Output Exercises

by pedagogues (Initiate)
on Nov 19, 1999 at 01:55 UTC ( #1008=perlexercise: print w/replies, xml ) Need Help??

File Input and Output Exercises

  1. Write a program which prompts the user for the name of a file to open, and then reads in the file line by line. When it has finished reading the file it should print the lines in reverse order. (solution)
  2. Write a program which asks the user to type the name of a file to log their typing into, and then reads in lines and writes them into the named file, stopping when it has read a line consisting only a "." on a line by itself. (solution)
  3. Write a program which copies one file to another. The program should take two command line arguments, the first being the source file name and the second being the destination file name. (solution)
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2023-06-01 23:50 GMT
Find Nodes?
    Voting Booth?

    No recent polls found