Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
use Date::Manip::Date; $d = Date::Manip::Date->new; for (36,18,-17,7,-45) { $d->parse(111111 . $_); print substr $d->printf("%j%a%p%h" x 4), -$_, 1; } print "\n";
Intermediate question
The date format has the four letters j a p h. Of the four letters in the output, which one do we extract from the output of which format letter?
Advanced question
This code will stop working about 45 days after it's posted. How can you fix the code so it works even after that date? I'll show a solution inside the spoiler, in case someone arrives here too late and wants to try this obfu.
Expert question
Among the five loop iterations, the string is parsed in five different ways. How many of these are deliberate features of Date::Manip?

Update 2023-02-07T22:53Z: improved the obfuscation by changing the list of numbers from 36,18,2,7,-45 to 36,18,-17,7,-45. Now the obfuscation outputs JaPh instead of Japh and the five iterations parse the date in five different formats rather than just four. There's one drawback:

In reply to This Japh will self-destruct in 45 days sorry SBECK by ambrus

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-05-29 15:03 GMT
Find Nodes?
    Voting Booth?

    No recent polls found