|
Posted by Michele Dondi on October 18, 2007, 6:19 am
Please log in for more thread options
>>
>> [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,
> There
> is a rogue carriage return (0xd) in the string
> 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 Alan Curry on October 18, 2007, 2:25 pm
Please log in for more thread options
>>
>> [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,
> There
> is a rogue carriage return (0xd) in the string
> 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 Michele Dondi on October 18, 2007, 3:48 pm
Please log in for more thread options On Thu, 18 Oct 2007 18:25:22 +0000 (UTC), pacman@TheWorld.com (Alan
Curry) wrote:
>This part right here:
>
>>>> C<for> loop
>
>could very easily be interpreted as making a comparison to a C-language-style
>for loop by someone who has never seen POD source before, or didn't expect to
>see it in a post that otherwise contained only ordinary English text with
>some small perly bits.
>
>Putting undeclared POD markup in a Usenet message seems about as wise as
>putting in other kinds of undeclared markup.
>
>Although you might wish that every perl programmer document every program and
>every subroutine with inline POD, they don't. (In some cases, we're lucky if
>they \fIread\fR any documentation, let alone write it.)
D'Oh! I hadn't thought of that. Unfortunately C<for> is not
unambiguous as other keywords and one easily want a special markup for
it, for which POD seems perfect. OTOH I hate when people writes and
all uppercase FOR instead, since that is simply *not* a keyword
itself.
Michele
--
->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
|
|
Posted by Wade Ward on October 18, 2007, 3:49 pm
Please log in for more thread options >>
>> [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,
> There
> is a rogue carriage return (0xd) in the string
> 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 Sherman Pendley on October 18, 2007, 4:42 pm
Please log in for more thread options >>
>> [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,
> There
> is a rogue carriage return (0xd) in the string
> 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 | | Printing a new line | May 10, 2008, 5:28 pm |
| backtick not printing the 'echo'ed line | July 19, 2004, 12:59 pm |
| start printing at the end of the previous line | July 18, 2006, 10:37 am |
| Printing the next line of text of the file | April 19, 2007, 6:37 pm |
| UTF-8 subject in an email | June 13, 2006, 7:58 am |
| How to get a colored subject | September 11, 2007, 6:06 am |
| Fetching to and from and subject from MIME:Parser | October 13, 2004, 12:40 am |
| Subject: Make 1000 dollars over night | March 7, 2005, 3:13 am |
| Print Subject without characters Just Numbers using POP3Client. Please Help | April 10, 2007, 11:27 pm |
| How can I get a colored subject in my Perl created e-mails. | September 11, 2007, 6:11 am |
|