Convert date into epoch in Perl on Solaris

Solaris 10 doesn't seem to like me a lot. I am trying to run a simple script to accept date and return epoch of that date:

#!/usr/bin/perl -w
use strict;
use Time::ParseDate;

my($date1)="Mon Mar 27 05:54:08 CDT 2009";
chomp $date1;
#Convert to seconds since start of epoch
my $time1 = parsedate($date1);
print "$time1"

Works perfectly fine on RHEL box, but gets screwed on Solaris(both have 5.8.8 Perl), giving the following error message.

Can't locate Date/Parse.pm in @INC (@INC contains: /usr/perl5/5.8.4/lib/sun4-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/sun4-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int /usr/perl5/vendor_perl/5.8.4 /usr/perl5/vendor_perl .) at try1.pl line 3. BEGIN failed--compilation aborted at try1.pl line 3.

Whats wrong here?.. how to correct this?.

Oh.. almost forgot, I cannot alter/install/modify anything on this Solaris box, since this script needs to be shipped to a customer who runs Solaris 10!. So asking him to install the module is definitely not an option. :frowning:

It looks like the Time:: .. CPAN module simply isn't installed on the other box.

You can use the core module Time::Local to convert date stuff into epoch seconds. Not quite as easy as the other module but its not difficult. Read the Time::Local documentation and pay attention to the months which are treated the same as localtime: 0-11

Thats right, its not installed.