> >## To build: >my %HoH = (); >foreach my $dates (@weeks) { > foreach my $daynums (@weeks1) { > $HoH{$dates} = { > daynums => $daynums > }; > } >} >
Hello, The codes above for building a hash is somewhat not correct. When you loop through @weeks1,you use {daynums,$daynums} as the value for the hash's key $date. But have you noticed that,each time you set the value you have overwrited the before value? So you just only get the last element in the @weeks1 as hash's value for all the hash's keys. >From date getting week,I think it's maybe good to use Perl's localtime() >subroutine or Time::Local module.:) -- http://home.arcor.de/jeffpang/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/