Click here to get back home

Is there a symbol table for special vars?

 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
Is there a symbol table for special vars? kj 06-22-2005
Posted by kj on June 22, 2005, 2:25 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 Ian Wilson on June 22, 2005, 2:57 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
DBI and symbol table August 20, 2005, 3:12 pm
symbol table question June 7, 2005, 11:36 am
Symbol Table and References June 13, 2006, 10:34 am
Undefined subroutine even though it appears in symbol table? January 27, 2007, 10:58 am
How to print on the special table cell column? March 20, 2007, 11:33 pm
Formatting a single line without effecting the entire table with the Text::Table module March 10, 2005, 11:18 am
Is use vars and our the same ? September 5, 2005, 8:37 am
Can't locate Symbol.pm in @INC August 22, 2005, 10:26 am
Symbol tables August 23, 2005, 8:41 am
Simulating 'use vars' April 28, 2006, 9:14 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap