|
Posted by Juergen Fenn on October 8, 2005, 8:48 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 Purl Gurl on October 8, 2005, 12:09 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 Purl Gurl on October 8, 2005, 12:20 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 Juergen Fenn on October 8, 2005, 10:49 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 Purl Gurl on October 8, 2005, 3:46 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 | | 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 |
| Newbie: Perl script to Windows and Linux executable versions. | September 18, 2009, 11:17 am |
| running 2 or more application in windows using perl | May 11, 2006, 9:55 am |
| How to fetch output of some other script in the current running perl script? | October 25, 2007, 8:18 am |
| running dos commands from perl script | November 14, 2006, 11:51 am |
| Perl version used when running the script | December 5, 2007, 12:36 am |
| Running Perl script in the backend from Html | September 11, 2007, 1:17 am |
| Running Perl script in the backend from Html | September 12, 2007, 11:51 pm |
| Error msgno = 427 in autosys.err when running perl script - What does "427" mean ???? | July 8, 2005, 8:10 am |
|
>> > 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,