|
Posted by hara on May 11, 2006, 9:55 am
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 A. Sinan Unur on May 11, 2006, 10:26 am
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 hara on May 12, 2006, 12:18 am
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 Brian McCauley on May 12, 2006, 2:15 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 | | backticks not running application (please help!) | January 30, 2006, 11:01 am |
| ActiveState license: I can't distribute perl with my Windows application? | July 2, 2005, 1:19 pm |
| Main Application Crashes during running a external process task | February 14, 2006, 10:24 am |
| [Newbie] Running a Perl script on Windows | October 8, 2005, 8:48 pm |
| Out of memory! When running perl script on windows | August 27, 2006, 11:30 am |
| Running and Feeding Input to Interactive Program in Windows from Perl Script | November 26, 2006, 12:30 pm |
| Closing Windows Application | March 25, 2006, 6:00 pm |
| Can I write an application using Windows and Linux? | January 19, 2006, 2:32 pm |
| C/C++:Can't Use "ssh/rsh ... ps ..." To Windows: cygwin not allowed, application conflicts | May 9, 2005, 12:24 pm |
| Re: problem running Convert::ASN1 on Windows XP | May 24, 2009, 12:00 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,