> >How about Time::Local? > >#!/usr/bin/perl >use strict; >use warnings; >use Time::Local; > >my %month; >@month{ qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec/ } = 0..11; > >my $date = "Thu Mar 9 23:04:03 2006"; > >my (undef, $month, $day, $h, $m, $s, $year) = split /\W+/, $date; > >my $time = timelocal($s,$m,$h,$day,$month{$month},$year); > >print $time,$/; > >print scalar localtime $time; > > >(Prints) >1141963443 >Thu Mar 9 23:04:03 2006 > > >Chris
Thank you,Chris.It's right for me. Thanks for others too. -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>