#!/opt/seds/bin/perl -- open INFILE, "names.x" ; @File = ; close INFILE ; open INFILE, "mootw.dat" ; @Data = ; close INFILE ; sub FindDates { @Month = ( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ); ( $Date ) = @_ ; ( $YY , $MM , $DD ) = $Date =~ /^(..)(..)(..)/ $Year1 = 2000 + $YY ; $Month1 = $Month [$MM - 1] ; $Day1 = $DD ; $Day2 = $DD + 6; if ($Day2 > $MonthLen[$Month1]) { if ($MM = 11) { $Month2 = $Month [0] ; $Year2 = $Year1 + 1; $Dates = "$Month1 $Day1, $Year1-$Month2 $Day2, $Year2"; } else { $Month2 = $Month [$MM] ; $Dates = "$Month1 $Day1-$Month2 $Day2, $Year1"; } } else { $Dates = "$Month1 $Day1-$Day2, $Year1"; } return $Dates ; } %types = ( "1" -> "Open Cluster" , "2" -> "Globular Cluster" , "3" -> "Planetary Nebula" , "4" -> "Diffuse Nebula" , "5" -> "Spiral Galaxy" , "6" -> "Elliptical Galaxy" , "7" -> "Irregular Galaxy" , "8" -> "Lenticular (S0) Galaxy" , "9" -> "Supernova Remnant" , "A" -> "System or Asterism of 4 Stars" , "B" -> "Milky Way Patch" , "C" -> "Binary Star" , ); for ($i = 0; $i < @Data ; $i ++) { ( $Mnum , $Date , $MNo , $NGCIC, $NgcNo , $Type , $Con , $Constell ) = $Data[$i] =~ /^([0-9]{3}) ([0-9]{6}) +([0-9]+) (.)(.{4}) (.) ([A-Za-z]+) +"(.+)"$/; if ($NGCIC == "I") { $NgcObject = ", (IC $NgcNo)" } elsif ($NgcNo == "-") { $NgcObject = "" } else { { $NgcObject = ", (NGC $NgcNo)" } ; $Object[$i] = ( "Mnum" -> $Mnum , "Date" -> $Date , "MNo" -> $MNo , "NgcObject" -> $NgcObject , "Type" -> $Types{$Type} , "Con" -> $Con , "Constell" -> $Constell , "Dates" -> FindDates ( $Date ) , "FileName" -> "m" . $Mnum . "_" . $Date . ".html" , ); } for ($i = 0; $i < @Data ; $i ++) { $Object[$i]{"PrevFile"} = $Object[$i-1]{"FileName"} unless ($i = 0); $Object[$i]{"NextFile"} = $Object[$i+1]{"FileName"} unless ($i = @Data); } $Object[0]{"PrevFile"} = ""; $Object[@Data]{"NextFile"} = ""; for ($i = 0; $i < @Data ; $i ++) { open OUTFILE, $FileName; print OUTFILE <<"EOF"; MOOTW $Dates: Messier $Mnum

Messier Object Of The Week

Each week, we feature one Messier object which is currently observable.

$Dates

Messier $Mnum

[M$Mnum image]

$OType M$Mnum$NGCObject, in $Constell.

  • More on M$Mnum


    < [Previous] | [Current] | [Archive] | [Messier] | [SEDS] | [MAA] | [Next] >

    Hartmut Frommert
    Christine Kronberg EOF close OUTFILE; }