Click here to get back home

perldoc use of PERL5LIB

 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
perldoc use of PERL5LIB alexxx.magni@gmail.com 05-29-2006
Get Chitika Premium
Posted by alexxx.magni@gmail.com on May 29, 2006, 9:06 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 Aukjan van Belkum on May 29, 2006, 9:08 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 alexxx.magni@gmail.com on May 29, 2006, 10: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
PERL5LIB - @INC - machine dependant subdirs September 1, 2004, 11:02 am
PERL5LIB variable does not work as expected January 7, 2007, 2:40 pm
Managing PERL5LIB with multiple perl installation November 17, 2004, 7:15 am
Properly setting my PERL5LIB for CPAN modules July 26, 2006, 8:16 pm
What's (not) up with www.perldoc.com? February 10, 2005, 9:29 pm
OS X and perldoc October 2, 2006, 6:54 pm
perldoc mirror? November 9, 2004, 9:32 am
perldoc perltie December 28, 2004, 8:52 pm
problem with perldoc September 24, 2005, 4:17 pm
In which perldoc are \t \n \d (etc) documented? November 11, 2005, 3:20 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap