Click here to get back home

perl get crash when using ClearCase::CtCmd::exec

 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
perl get crash when using ClearCase::CtCmd::exec Maverick Ieong 11-17-2004
Get Chitika Premium
Posted by Maverick Ieong on November 17, 2004, 6:31 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 A. Sinan Unur on November 18, 2004, 5:27 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 Maverick Ieong on November 18, 2004, 11:01 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

Similar ThreadsPosted
ClearCase 05.00 using ClearCase::CtCmd::exec crash perl 5.8.3 November 23, 2004, 9:53 am
ClearCase::CtCmd Question November 23, 2005, 1:05 pm
Using clearcase command in perl script December 26, 2006, 10:28 am
Re: how to use clearcase commands in perl script January 17, 2007, 11:01 am
Re: how to use clearcase commands in perl script January 18, 2007, 2:19 am
how to use clearcase commands in perl script January 17, 2007, 8:53 am
Exec/System call with spaces in exec path problem ... December 2, 2005, 1:41 pm
Perl threads + HTTPS = Crash :( October 14, 2007, 11:27 pm
perl crash on sucking $socket into array January 6, 2005, 9:12 am
Need Help: LibXML + LWP::Simple Is Making Perl Crash December 25, 2007, 11:24 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap