#!/usr/bin/perl # I will be going to Wellfleet MA for my summer vacation (1.5 week) and I wrote # a little perl script that I can run in VA that emulates the Wellfleet's Town # Clock. # # The following is from the chamber of comerece web page at # http://www.wellfleetchamber.com/history.html # # The Town Clock # "The only Town clock in the world that strikes on ship's time" is located in # the steeple of the First Congregation Church. Money to install this unique # device was appropriated at the annual meeting in 1952 and the installation # was made that year. Selectman Lawrence R. Gardinier sponsored the move in # town meeting and built and assembled the mechanism. The story of the clock # appeared in Ripley's Believe It or Not and the above quotation is from this # syndicated feature. The story also appeared in the Associated Press and other # news agencies and also in two magazines of national circulation. # # Ship's Time may be a bit confusing for many people, and the following table # is appended for the convenience of the inexperienced. # One, five and nine o'clock are "two bells." # Two, six and ten o'clock are "four bells." # Three, seven and eleven o'clock are "six bells." # Four, eight and twelve o'clock are "eight bells." # The half hours are struck by adding one stroke to the corresponding even hours. # # Let's get the current date & time. ($sec,$min, $hour) = localtime(time); my $num_bells = (($hour % 4)?($hour % 4)*2:8)+($min>=30); printf "Current Time: %i:%02i\n",$hour,$min; print "Number of bells: $num_bells\n";