Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

File Input and Output Exercises

by pedagogues
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2021-12-05 11:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (31 votes). Check out past polls.

    Notices?