|
Posted by simone.romano82 on January 12, 2008, 12:24 pm
Please log in for more thread options
show/hide quoted text
>> [snip]
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>> not really sure, but could be a rogue "\r" in $1,
show/hide quoted text
> There
> is a rogue carriage return (0xd) in the string
show/hide quoted text
> Is there something I can do to deal with this
> situation?
Repair the corrupted file:
perl -p -i -e 'tr/\r//d' bad_file
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
|
|
Posted by Dr.Ruud on January 12, 2008, 12:56 pm
Please log in for more thread options
show/hide quoted text
>> [snip]
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>> not really sure, but could be a rogue "\r" in $1,
show/hide quoted text
> There
> is a rogue carriage return (0xd) in the string
show/hide quoted text
> Is there something I can do to deal with this
> situation?
Repair the corrupted file:
perl -p -i -e 'tr/\r//d' bad_file
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
|
|
Posted by Joost Diepenmaat on January 12, 2008, 12:58 pm
Please log in for more thread options show/hide quoted text
>> [snip]
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>> not really sure, but could be a rogue "\r" in $1,
show/hide quoted text
> There
> is a rogue carriage return (0xd) in the string
show/hide quoted text
> Is there something I can do to deal with this
> situation?
Repair the corrupted file:
perl -p -i -e 'tr/\r//d' bad_file
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
|
|
Posted by Jürgen Exner on January 12, 2008, 1:51 pm
Please log in for more thread options show/hide quoted text
>> [snip]
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>> not really sure, but could be a rogue "\r" in $1,
show/hide quoted text
> There
> is a rogue carriage return (0xd) in the string
show/hide quoted text
> Is there something I can do to deal with this
> situation?
Repair the corrupted file:
perl -p -i -e 'tr/\r//d' bad_file
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
|
| Similar Threads | Posted | | Communication between Cgi and another perl application | December 13, 2004, 2:14 pm |
| googletalk communication with perl | September 16, 2005, 8:34 pm |
| Bidirectional communication between Perl and C | January 6, 2006, 2:36 am |
| Serail Port communication using PERL | May 4, 2006, 2:59 am |
| Perl parent-child communication. | April 24, 2007, 4:42 am |
| Client-Server Communication in Perl CGI | November 14, 2008, 7:57 am |
| VB6 and Perl on 2000/XP: Req recommendation for interprocess communication | June 4, 2005, 9:24 am |
| Inter Program Communication ... | October 26, 2004, 5:42 pm |
| Fast pipe communication | February 3, 2006, 4:17 pm |
| Distributed multitasking, POE, communication | October 7, 2006, 6:24 pm |
|
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>> not really sure, but could be a rogue "\r" in $1,