If you use POSIX::strftime you could improve your sub by accepting some integer value:
- * If you don't receive any value or you receive 0 you would return your format.
- * If 1, the LINUX format: yymmddhhmmss (I guess).
- * Another format might be the MySQL one.
- * Another one, the short format mm/dd/yy hh:mm:ss
- * Then, the long one mmm,dd yyyy hh:mm:ss tz
- * Create others
The more possible outputs you could add, the more useful sub it would become. Perhaps, having your own module of useful subs to load with every code you write...