Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Create a record with fixed length
November 19, 2008, 12:53 am
rate this thread
- Martien Verbruggen
November 19, 2008, 1:59 am
Re: Create a record with fixed length
What exactly are you having trouble with?
To read a fixed length from a file, see read() (perldoc -f read). To
"split to a fixed length", probably see substr() (perldoc -f substr)),
depending on what exactly you men by that. Maybe you need unpack()? To
write to another file, use print, or maybe syswrite() if you need to
write part of your string. Of course, you'll also need to open the
existing file for read, and the target file for write (perldoc -f open,
perldoc -f close).
It's hard to tell what exactly you need, and in which order. You give
virtually no useful information.
Martien Verbruggen | Think of the average person. Half of the
| people out there are dumber.
- » FAQ 7.24 How can I catch accesses to undefined variables, functions, or methods?
- — Next thread in » PERL Discussions