> #!/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

Jeff, 

Is this an array of hashes desingnated by { }?

my %month;
@month{ qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct
Nov Dec/ } = 0..11;


       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play 
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to