in reply to looking for feedback on my first script

My overall first impression is that this is pretty good code - subdivided into subroutines, nicely formatted, etc. It could be compacted / made mode "Perlish" in a couple places, but because TIMTOWTDI and the code is still clean and pretty easy to follow, I think it's fine the way it is. Just a few other issues / comments:

Replies are listed 'Best First'.
Re^2: looking for feedback on my first script
by hippo (Chancellor) on Jan 08, 2021 at 16:20 UTC
    I would suggest you take the time to study Time::Piece and/or DateTime instead of the basic localtime stuff you're doing here

    Completely agree. I'd also point out that of the two Time::Piece is always my first port of call as it is small and in core and is good enough for 95% of the date/time work I need to do. By contrast, DateTime is a bit of a monster but it does cater pretty well for the remaining 5% of cases.


Re^2: looking for feedback on my first script
by thirtySeven (Acolyte) on Jan 08, 2021 at 16:25 UTC
    thanks for the feedback. I will be taking a lot of this advice. It will take me a few hours to work through everything you have said. I did not consider that it was unsafe to use system with user inputs. I am off to look into the various modules you suggested.