RE: linefeed
The problem is that these characters are added when printing the output to file. Even if I remove these with chomp or chop they will be added again when I write the data to file. Regards, Charles Scheepers Pr.Eng. [EMAIL PROTECTED] (011) 324-9026 (084) 511-6164 -Original Message- From: McMahon, Christopher x66156 [mailto:[EMAIL PROTECTED] Sent: 26 June 2003 17:08 To: Charles Scheepers; [EMAIL PROTECTED] Subject: RE: linefeed I just did this myself (see the item from this list from the 24th with title "duh...") I had to mess with chomp and chop both (you might have to play with them to get your format exactly right), there might be a more efficient way to do this, but this works: *** while ($logResp ne "") { $logResp = ; chop $logResp; $eol = "\r\n"; $sendLR .= "$logResp$eol"; } chomp $sendLR; chop $sendLR; #do something with $sendLR ** -Chris -Original Message- From: Charles Scheepers [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 2:33 AM To: [EMAIL PROTECTED] Subject: linefeed Hi All I am having a problem with linefeed. I have written a program that writes records to an output file. The program that uses this file as input requires that all records are ended with "\x0A" and not CRLF (\x0D\x0A). This program runs on UNIX. How do I ensure that records are ended only with \x0A??? Do I have to use an other method than: print FILHNDL "Text...";??? Regards, Charles Scheepers Pr.Eng. [EMAIL PROTECTED] (011) 324-9026 (084) 511-6164 This communication is private, privileged and confidential intended only for the named addressee. Any recipient who is not a named addressee is not entitled to retain, copy, disseminate or take action in reliance upon this communication. If you have received it in error, please notify the sender immediately and destroy the original. This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. This communication is private, privileged and confidential intended only for the named addressee. Any recipient who is not a named addressee is not entitled to retain, copy, disseminate or take action in reliance upon this communication. If you have received it in error, please notify the sender immediately and destroy the original.
RE: linefeed
I just did this myself (see the item from this list from the 24th with title "duh...") I had to mess with chomp and chop both (you might have to play with them to get your format exactly right), there might be a more efficient way to do this, but this works: *** while ($logResp ne "") { $logResp = ; chop $logResp; $eol = "\r\n"; $sendLR .= "$logResp$eol"; } chomp $sendLR; chop $sendLR; #do something with $sendLR ** -Chris -Original Message- From: Charles Scheepers [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 2:33 AM To: [EMAIL PROTECTED] Subject: linefeed Hi All I am having a problem with linefeed. I have written a program that writes records to an output file. The program that uses this file as input requires that all records are ended with "\x0A" and not CRLF (\x0D\x0A). This program runs on UNIX. How do I ensure that records are ended only with \x0A??? Do I have to use an other method than: print FILHNDL "Text...";??? Regards, Charles Scheepers Pr.Eng. [EMAIL PROTECTED] (011) 324-9026 (084) 511-6164 This communication is private, privileged and confidential intended only for the named addressee. Any recipient who is not a named addressee is not entitled to retain, copy, disseminate or take action in reliance upon this communication. If you have received it in error, please notify the sender immediately and destroy the original. _ This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system.
Re: linefeed
Charles Scheepers wrote: Thanks for the reply... I an actually running the program on an UNIX platform, but it still uses CRLF in the output. I have actually tried: "print FILHNDL "Text...\012";" and the output is still translated to CRLF. Will utilities like dos2unix make a difference? Is the special perl variable $\ (output record separator) getting modified in this code or in any module that you are using. print concatenates $\ to whatever it is printing. The default value for $\ is undef. perldoc -f print perldoc perlvar Regards, Charles Scheepers Pr.Eng. [EMAIL PROTECTED] (011) 324-9026 (084) 511-6164 -Original Message- From: Darbesio Eugenio [mailto:[EMAIL PROTECTED] Sent: 26 June 2003 10:55 To: Charles Scheepers; [EMAIL PROTECTED] Subject: RE: linefeed -Original Message- Charles Scheepers wrote: Hi All I am having a problem with linefeed. I have written a program that writes records to an output file. The program that uses this >>>file as input requires that all records are ended with "\x0A" and not CRLF (\x0D\x0A). This program runs on UNIX. How do I ensure that records are ended only with \x0A??? Do I have to use an other method than: print FILHNDL "Text...";??? For keeping it simple I suggest you to write the text file as usually with , then to use UNIX utilities like as "dos2unix" to convert DOS text file in UNIX text file (you can run dos2unix from within Perl of course). E. LOQUENDO S.p.A. Vocal Technology and Services [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please contact us by replying to [EMAIL PROTECTED] Thank you This communication is private, privileged and confidential intended only for the named addressee. Any recipient who is not a named addressee is not entitled to retain, copy, disseminate or take action in reliance upon this communication. If you have received it in error, please notify the sender immediately and destroy the original. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: linefeed
-Original Message- Charles Scheepers wrote: >>>I an actually running the program on an UNIX platform, but it still uses CRLF in >>>the output. I have actually tried: "print FILHNDL >>>"Text...\012";" and the output >>>is still translated to CRLF. Will utilities like dos2unix make a difference? Dos2unix converts CRLF to LF in text files. So it works like as a "post-processor" of your Perl program. Anyway now I am working on Windows platforms then I cannot test my suggestion. E. LOQUENDO S.p.A. Vocal Technology and Services [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please contact us by replying to [EMAIL PROTECTED] Thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: linefeed
Thanks for the reply... I an actually running the program on an UNIX platform, but it still uses CRLF in the output. I have actually tried: "print FILHNDL "Text...\012";" and the output is still translated to CRLF. Will utilities like dos2unix make a difference? Regards, Charles Scheepers Pr.Eng. [EMAIL PROTECTED] (011) 324-9026 (084) 511-6164 -Original Message- From: Darbesio Eugenio [mailto:[EMAIL PROTECTED] Sent: 26 June 2003 10:55 To: Charles Scheepers; [EMAIL PROTECTED] Subject: RE: linefeed -Original Message- Charles Scheepers wrote: >>>Hi All >>>I am having a problem with linefeed. I have written a program that writes records >>>to an output file. The program that uses this >>>file as input requires that all >>>records are ended with "\x0A" and not CRLF (\x0D\x0A). This program runs on UNIX. >>>How do I ensure that records are ended only with \x0A??? Do I have to use an other >>>method than: print FILHNDL "Text...";??? For keeping it simple I suggest you to write the text file as usually with , then to use UNIX utilities like as "dos2unix" to convert DOS text file in UNIX text file (you can run dos2unix from within Perl of course). E. LOQUENDO S.p.A. Vocal Technology and Services [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please contact us by replying to [EMAIL PROTECTED] Thank you This communication is private, privileged and confidential intended only for the named addressee. Any recipient who is not a named addressee is not entitled to retain, copy, disseminate or take action in reliance upon this communication. If you have received it in error, please notify the sender immediately and destroy the original. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: linefeed
-Original Message- Charles Scheepers wrote: >>>Hi All >>>I am having a problem with linefeed. I have written a program that writes records >>>to an output file. The program that uses this >>>file as input requires that all >>>records are ended with "\x0A" and not CRLF (\x0D\x0A). This program runs on UNIX. >>>How do I ensure that records are ended only with \x0A??? Do I have to use an other >>>method than: print FILHNDL "Text...";??? For keeping it simple I suggest you to write the text file as usually with , then to use UNIX utilities like as "dos2unix" to convert DOS text file in UNIX text file (you can run dos2unix from within Perl of course). E. LOQUENDO S.p.A. Vocal Technology and Services [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please contact us by replying to [EMAIL PROTECTED] Thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]