Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Perl oddities

by ysth (Canon)
on Mar 01, 2005 at 13:43 UTC ( [id://435414]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl oddities
in thread Perl oddities

and having it be relative to the start of the program (actually, $^T, which you can change to suit) saves having to call time() for each -M, -A, or -C (in addition to making the results equal for different files with the same timestamp).

Replies are listed 'Best First'.
Re^3: Perl oddities
by BrowserUk (Patriarch) on Mar 01, 2005 at 13:51 UTC
    saves having to call time() for each -M, -A, or -C (in addition to making the results equal for different files with the same timestamp).

    I'm not quite sure I follow that. If they just returned the timestamp from the files as absolute values, you wouldn't have to call time() at all? And the results of different files with the same timestamps would be the same anyway?


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.
      The relative versions allow you to express your problems in problem terms, not in implementation terms. Which is nice when you're writing a perl -e type solution. Think of all the other Perl shortcuts that are designed to let you express your solution in terms of the problem, not in terms of the opcodes.

      --
      [ e d @ h a l l e y . c c ]

      Ah; I was thinking the complaint was that they do not provide instantaneous ages in days, not that they don't just give timestamps, so I was giving justifications for having the ages be reported in terms of a fixed timepoint rather than as of the moment -M, etc. is executed, even though it results in oddities such as negative ages for timestamps later than $^T.

      bonus points for pointing out missing or extra commas in the above ramble; commas are not my forte

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://435414]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-18 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found