#!/usr/bin/perl # I will be going to Wellfleet MA for my summer vacation (1.5 week) an +d I wrote # a little perl script that I can run in VA that emulates the Wellflee +t'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 lo +cated in # the steeple of the First Congregation Church. Money to install this +unique # device was appropriated at the annual meeting in 1952 and the instal +lation # was made that year. Selectman Lawrence R. Gardinier sponsored the mo +ve 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 fr +om 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 followin +g 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";


----
Zak
"There is no room in this country for hyphenated Americanism" ~ Theodore Roosevelt (1915)

In reply to Vacation by zakzebrowski

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.