Click here to get back home

croak conventions in methods?

 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
croak conventions in methods? John Bokma 11-18-2004
Get Chitika Premium
Posted by John Bokma on November 18, 2004, 12:55 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
Coding Conventions and Speech: No Punctuation, Renaming Operators etc... July 31, 2005, 2:11 pm
croak/confess from within File::Find July 10, 2007, 1:40 pm
Unwanted output using croak with eval June 13, 2008, 12:35 am
How do I prevent croak in a module from making my script die? August 1, 2005, 7:15 am
Overriding *all* methods August 25, 2004, 8:36 pm
listing all available methods May 22, 2007, 2:27 am
2 methods to get the domains's IP,but neither of them is good. August 1, 2004, 1:56 pm
Simple methods when using fields May 21, 2006, 6:03 am
How to find methods of Classes ? September 18, 2006, 2:03 am
Coderef to object methods? September 19, 2006, 3:09 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap