for (1..100000){ my $date = Date::Indian->new( ymd => sprintf("%s-%s-%s",$FORM{'year'},$FORM{'month'},$FORM{'day'}), # ex: ymd => '2003-10-31' tz => sprintf("%s",dec2timezone($FORM{'tz'})), # ex: tz => '-5:30' locn => sprintf("%sE %sN",$FORM{'lat'},$FORM{'long'}) # ex: locn =>'82:30E 17:25N' ); my (@y, $m, $d, $t ) = $date -> ymd(); my ($moonrise, $moonset, $flag) = $date -> moonriseset(); my ($sunrise, $sunset, $flag) = $date -> sunriseset(); $moonrise = dec2hour_minute($moonrise); $moonset = dec2hour_minute($moonset); $sunrise = dec2hour_minute($sunrise); $sunset = dec2hour_minute($sunset); printf "MA $moonrise, MU $moonset|SA $sunrise, SU $sunset"; }