Click here to get back home

how to get tomorrow date using Date::CALC

 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
how to get tomorrow date using Date::CALC Bob 09-01-2005
Get Chitika Premium
Posted by Bob on September 1, 2005, 7:19 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 Paul Lalli on September 1, 2005, 5:56 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
Looking for old Date::Calc module September 15, 2005, 6:14 pm
Date::Calc::Add_Delta_YM() undefined May 1, 2005, 4:04 am
problem installing date::calc on win box August 31, 2005, 11:19 pm
Date::Calc and postgres timestamp December 27, 2006, 9:50 am
[Date-Calc] Extract each 1st (or 2,3..) Monday of month ? February 20, 2006, 8:36 am
update: timezone offset calc and date formatting April 8, 2005, 1:32 pm
Date Manipulation: Week_Number back to Date February 1, 2005, 7:20 pm
Finding date 1 day earlier than a given date! September 8, 2004, 10:07 am
Help with date May 5, 2005, 8:53 am
getting $date May 31, 2005, 1:46 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap