Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Related technical and longer articles
Writing to and reading from files
Tips and short articles on this subject
Transforming data in Perl using lists of lists and hashes of hashes
Reactive (dynamic) formatting in Perl
Seven new intermediate Perl examples
Formatting with a leading + / Lua and Perl
There is more that one way - Perl
Reading a file multiple times - file pointers
Good, steady, simple example - Perl file handling
Some one line Perl tips and techniques
Being sure to be positive in Perl
Iterators - expressions tha change each time you call them
Perl - its up to YOU to check your file opened
printf - a flawed but useful function
STDIN, STDOUT, STDERR and DATA - Perl file handles
Relative or absolute milkman
How many people in a room?
Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Perl module P207
File Handling
Exercises, examples and other material relating to training module P207. This topic is presented on public courses Perl Programming, Perl bootcamp

A Typical computer program is run from a single keyboard or other control point, but with access to thousands of files. So it's "cheap" for a programming ...
http://www.wellho.net/mouth/255_STDI ... ndles.html  [short article]
Learning to program in Perl / Perl Programming - Programming Perl - for newcomers to the language This course introduces you to the Perl programming language. ...
http://www.wellho.net/course/ppfull.html  [course]
Learning to Program in Perl / Perl Programming - Learning Perl - whether you're new to programming or 'converting'. This course covers programming in the ...
http://www.wellho.net/course/lpfull.html  [course]
Perl Bootcamp - The fundamentals of the language. This course covers the fundamentals of the Perl programming for computer professionals who are new to ...
http://www.wellho.net/course/bpfull.html  [course]
When you open a file for read, you create a "file pointer" which knows where in the file you are, and each time you read from the file this advances so ...
http://www.wellho.net/mouth/1442_Rea ... nters.html  [short article]
1. You open the file using the open function. This returns a file handle through which you access the data; a file handle comprise a buffer within your ...
http://www.wellho.net/solutions/perl-wri ... files.html  [longer article]
I write a lot of demonstration pieces, and there's always a need for a balance. Spike solutions / proof of principle and concept work well in front ...
http://www.wellho.net/mouth/1416_Goo ... dling.html  [short article]

Opening data files, reading from them, and writing to them. Checking whether files exist. And if so, how big are they? Using the file handling elements of Perl to handle keyboard, screen, other processes, and connections to other computers.

This topic is presented on public courses Perl Programming, Perl bootcamp

Examples from our training material
addplus   Formatter - adding a leading plus
bridges   sample answer - town with Bridges in name
christmas   Formatted printing - splittin money between the grandchildren
ck   Splitting money many ways - formatted printing
ddd   Splitting and reformatting data
fan   One input and five output files in a single program
fprint   Formatted printing - some specifier details
fsv   File open, read, write test example
leedspark   alternative answer to practical at end of module
legacy   Divide money between children and print neatly
output.txt   Sample output "park" program
park   Sample answer to "the park" exercise
paut   Piping a ping into your program
perlwget   Running an OS command from within a Perl script
piper   Use of file handles to pipe from and to processes
procmon   Process monitoring - demonstration of principle
reporter   file status operators -x and -s
sp   Formatted printing
wacsal   Re-active formatting
Pictures
"Now where was that data file??"
"Now where did I save that data file?"
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
File input and output.
File Handles.
The open function.
Reading from a file handle.
Writing to a file handle.
Closing a file.
Other things you can handle through the file interface.
File testing.
Formatted printing.
Floating point formats.
Formats for whole numbers (integers).
Formats for variable text strings.
Constant text.
sprintf.
Summary.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.


© WELL HOUSE CONSULTANTS LTD., 2009: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho