Don't ask to ask, just ask | |
PerlMonks |
Add new line character to and ebcdic fileby gkol0279 (Initiate) |
on Apr 15, 2013 at 07:49 UTC ( [id://1028695]=perlquestion: print w/replies, xml ) | Need Help?? |
gkol0279 has asked for the wisdom of the Perl Monks concerning the following question:
Hi, i am a bit new to perl. Need an answer:
I wrote a script to convert an ascii file into an ebcdic file using the Convert::EBCDIC qw(ebcdic2ascii ascii2ebcdic).
I get an input file, which i read line wise and then convert each record from ascii to ebcdic format. After conversion, i have to write this to an output file. Then read the next record and do the same and print it in the next line.
After conversion this file will be sent to IBM mainframe system for further processing. Now what is happening is i append "\n" to print the next record in a new line and the \n will be in ascii and not EBCDIC.
How can i convert the \n to be ebcdic in file and yet work as ascii while printing? Any suggestions?
Back to
Seekers of Perl Wisdom
|
|