Click here to get back home

:ATTR(:default<> problem

 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
:ATTR(:default<> problem mmccaws2 02-26-2007
Get Chitika Premium
Posted by mmccaws2 on February 26, 2007, 2:08 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
perl net::ldap problem using variable eg attr => [ $v1,$v2..] October 6, 2004, 4:43 pm
use Class::Std :ATTR September 25, 2008, 1:53 am
default value June 3, 2006, 9:11 am
Why aren't 'warnings' on by default? February 5, 2005, 2:19 am
/cgi default path value May 25, 2006, 10:04 am
Change default @INC without recompiling? October 26, 2004, 3:01 am
LWP::UserAgent and non-default outgoing IP November 1, 2006, 7:18 am
Selecting Default Gateway April 18, 2008, 1:45 pm
iCal default calendar June 2, 2008, 8:07 am
set default value for undefined variables August 21, 2008, 12:56 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap