Click here to get back home

assigning multiple hash values to multiple variables

 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
assigning multiple hash values to multiple variables Patrick 05-02-2006
Posted by Brian McCauley on May 3, 2006, 1:06 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
Assigning multiple hash entries with deref chain in front May 6, 2005, 5:56 am
sort on multiple hash values October 8, 2008, 1:36 pm
Comparing values of multiple hash keys July 26, 2006, 2:50 am
Sort on multiple values January 26, 2007, 4:18 am
passing multiple values into an argument as an array ? September 22, 2006, 11:43 pm
Grabbing multiple variables based on name, with regexp? February 20, 2006, 7:57 pm
Perl data structure to hold same multiple keys and different values September 17, 2007, 6:38 am
Combining multiple hash references into one hash reference September 1, 2005, 1:47 pm
Multiple Inheritance: mixed base class refs (hash, array) April 29, 2005, 2:29 am
multiple changes on multiple lines April 2, 2005, 9:42 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap