From the original code it looks as though you're on a Unix system. Type perl -v at the command prompt.

Now chmod +x <FILENAME> where FILENAME is the name of your Perl script. now you can run the script and see it's output.

May I strongly recommend Learning Perl at this point, your last post indicates that you have a bit of reading to do before you can modify scripts to get them to work as you desire and while no one here minds giving someone a pointer to the solution they are missing, you do have to do a little work yourself.

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."

In reply to Re^5: search for duplicated via IPTC field (OS X) by Utilitarian
in thread search for duplicated via IPTC field (OS X) by goppy

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.