Click here to get back home

Problem with inline -java

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Problem with inline -java arun 04-12-2005
Get Chitika Premium
Posted by arun on April 12, 2005, 7:39 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 Patrick LeBoutillier on April 28, 2005, 8:39 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 ThreadsPosted
How to pass array from java to perl using inline java January 31, 2007, 12:27 pm
CPANPLUS::Backend and Inline::Java August 18, 2004, 5:24 am
testing for existence of an inline file with Inline::Files December 2, 2004, 5:28 pm
Padding Problem with Blowfish and Crypt::CBC and Java Cipher August 12, 2005, 4:21 pm
Inline C August 6, 2004, 9:04 am
Inline::Tcl vs. Inline::Tcl August 23, 2006, 12:09 pm
Q: re Inline and Benchmark November 3, 2004, 1:23 am
Questions about Inline::C September 28, 2006, 3:58 am
Inline C and different platforms October 2, 2006, 2:50 pm
Parallel::Pvm and Inline C April 8, 2007, 1:18 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap