Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: print last file updated into directory

by Anonymous Monk
on Oct 31, 2014 at 08:33 UTC ( [id://1105707]=note: print w/replies, xml ) Need Help??


in reply to Re^3: print last file updated into directory
in thread print last file updated into directory

By low level , is it that it is not an efficient way to traverse directory structures ?

low level in the sense that its a waste of programmer time common waste of noob time. Path::Tiny uses readdir so that you don't have to. File::Find::Rule uses readdir so that you don't have to. Its convenience, why spend 15min-2hours to reinvent Path::Tiny/File::Find::Rule each time you have a problem?

File::Find::Rules is like cake (sweet), where File::Find is like raw flour, opendir/readdir is like wheatberries/otas/groats/whole wheet you have to grind into flour before you can bake your cake

was just reading up about Path::Tiny on CPAN. It says it does not try to work in non-Windows and non-linux mode.

And is that a concern for you? :) Today? :) Usage share of operating systems

also i see it has quite a few dependencies and wondering if it was pure perl or not, which might be a deciding factor for me ? I ran the following command to check the above ... which gave me the output

And what does that output tell you? :)

Path::Tiny -> http://deps.cpantesters.org/?module=Path%3A%3ATiny;perl=latest

  • Comment on Re^4: print last file updated into directory

Replies are listed 'Best First'.
Re^5: print last file updated into directory
by perlron (Pilgrim) on Oct 31, 2014 at 10:16 UTC

    thanks for the pointers. makes sense to use the latest version of perl then.
    I use a box which has 5.10.1.
    some of the customers ive worked with have HP UX and solaris , besides there's no telling to which server OS, they will migrate to in the future, in which case i might have to rework the code if i use Path::Tiny.
    Thanks! im learning

    The temporal difficulty with perl is u need to know C well to know the awesome.else u just keep *using* it and writing inefficient code

      Just an FYI, if you look at the links Anonymous Monk gave you, and checked the dependencies, they're all core and have been for many years. Path::Tiny is a pure perl module, so likely this won't give you much cause for concern.


        thanks Marto. Lots of docs im going through right now..shared to my by Anonymous Monk .

        The temporal difficulty with perl is u need to know C well to know the awesome.else u just keep *using* it and writing inefficient code

      besides there's no telling to which server OS, they will migrate to in the future, in which case i might have to rework the code if i use Path::Tiny.

      Program for today and today's operating systems to solve todays problem, what you're actually getting paid for, the future is unpredictable, cross that bridge when you get paid for it :)

      FWIW the way I see it Path::Tiny should work for you today, it should work for 99% of computers in use today, because 99% are Unix-like and Win32Windows

      Some perspective on predicting the future Re^6: Finding repeat sequences.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-24 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found