|
comp.lang.perl.misc - PERL programming language
|
|
|
|
|
Posted by Liora on January 11, 2007, 1:35 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 Paul Lalli on January 11, 2007, 1:44 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 Liora on January 11, 2007, 1: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 Jim Gibson on January 11, 2007, 4:33 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. Gleixner on January 11, 2007, 1:53 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 | | perl/postscript csv label maker | March 5, 2009, 1:15 am |
| Can't Display textbox label embedded in perl | May 15, 2006, 3:32 pm |
| or, || not working with next LABEL | August 9, 2007, 6:38 pm |
| "Found Perl" | January 17, 2005, 10:10 pm |
| perl cpan autobundle not found | February 10, 2009, 8:20 pm |
| Perldoc: No documentation on perl found [newbie] | December 10, 2004, 1:22 pm |
| strawberry perl: Form method not found | March 23, 2008, 12:09 am |
| Bug found in Open Perl IDE perl5db.pl module | July 30, 2008, 5:21 am |
| Strange Perl line : Return the result of a function to a function | October 24, 2006, 9:19 am |
| dmake.exe: Error: -- 'C:\Perl\libConfig.pm' not found, and can't be made | April 18, 2009, 4:30 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,