Click here to get back home

no "won't stay shared" warning for "use constant" anon subs

 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
no "won't stay shared" warning for "use constant" anon subs Andrew 07-13-2005
Get Chitika Premium
Posted by Andrew on July 13, 2005, 11:14 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 Brian McCauley on July 13, 2005, 8:05 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
Problem with subroutine Variable "$file" will not stay shared at.. December 30, 2006, 11:14 am
not sure why I am getting the following warning "Useless use of a constant in void context" December 13, 2007, 9:52 am
Untraceable warning: "Warning: Use of "require" without parentheses is ambiguous at (eval 23) line 1." May 16, 2006, 9:45 pm
Adding values to anon hash of hash while looping... September 2, 2005, 7:42 am
Subs: Returning two hashes January 8, 2005, 1:52 am
Carp & parameters passed to subs March 24, 2006, 4:41 am
REs Returning undef Not Being Passed to Subs April 6, 2006, 1:26 pm
B::Lint does not detect undefined subs August 7, 2006, 12:17 pm
lists,shift,subs and dumb question November 5, 2004, 5:23 pm
Prototyping Subs as func expr, list As In map? August 3, 2006, 3:15 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap