I have few dates in the format : ' Wed Mar 4 03:11:59 2009 '. I wish to find the difference in days between those dates with current date-time.
I am using DateTime::Forma t::Strptime module at top. The dates I am getting from DB table in integer format. So converted that in normal date format with code :
$ptime= scalar localtime($row[3]);
And this $ptime is having date in the format ' Wed Mar 4 03:11:59...
User Profile
Collapse
-
Date difference between two dates
-
Thanx all; got the solution. -
Copy image from a URL into a local folder
What can be the simplest perl code to copy an image(a perticular jpg file) from URL to a local folder. Before putting it to the local folder I need to rename it to 1.jpg. -
With LWP; wish to print a part of a page in browser
Am using LWP module.
I wish to read a page and print a part of it.
I want t read first 300 characters of <div id="bodyContent "> written inside the html page.
Code I am using :
...Code:#!/usr/bin/perl use DBI; use CGI; use LWP::Simple; use LWP::UserAgent; use DateTime::Format::Strptime; use JSON; use HTML::Template; use HTML::Parser;
-
Issue with special characters in Perl
I am getting some special characters in my browser displayed weirdly, while getting them from from the BLOB of a DB table.
Here it is :
" My name is �Dibyendu Chatterjee�.... ."
I want all special characters pulled from the BLOB as it is through perl.
Please help...
No activity results to display
Show More
Leave a comment: