"Your example would work great but I am limited in what modules I can use and Timepiece is not one of them. I should have clarified that."
You still can clarify that with an update to your OP explaining the constraints you're working under.
I have no idea whether:
-
this is schoolwork and you need to demonstrate that you understand date/time manipulation
-
you didn't know that Time::Piece (builtin) has been included with Perl since version 5.10.0
-
you have a version of Perl prior to 5.10.0 and have some restriction on using CPAN
-
you were unaware that you could install Time::Piece from CPAN
-
there is some other limitation involved
For future reference, please consider including this type of information when you first post.
While we're happy to help, we don't really like hearing: "Your solution is useless to me because of something I'm not telling you about.".
|