Click here to get back home

perl to move mail from inbox to a personal folder

 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
perl to move mail from inbox to a personal folder devaraj.takhellambam 08-04-2006
Posted by devaraj.takhellambam on August 4, 2006, 1:03 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
PERL ---> Move email from Inbox folder to another or vice versa in OUTLOOK August 4, 2006, 10:39 pm
Using Mail::IMAPClient and Mail::Folder together June 2, 2005, 9:57 pm
Are there alternatives to Mail::Box and Email::Folder? September 7, 2004, 3:41 pm
YOUR PERSONAL ATM June 2, 2007, 12:56 am
How to move perl from one PC to another PC (windows XP) February 5, 2008, 11:15 pm
Perl to move files by specific size September 15, 2005, 5:46 pm
How to create a folder in ftp using perl August 8, 2006, 12:49 am
write to windows share folder from perl/Win32 October 25, 2005, 4:48 pm
Create a chinese directory (folder) by Perl in Windows 2000 English OS September 21, 2004, 4:51 pm
perl in Windows: using the "Send To" folder and perl September 23, 2004, 4:47 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap