On a completely different note, I noticed that you're creating your own getDateTime function. It looks like you're duplicating effort.
If you replace the use Time::localtime line with use POSIX qw(strftime), you can use the following line for formatting the time:
strftime ("%D %l:%M %p", localtime)
(note that that's a lowercase L for the hour) which prints out exactly what you have for getDateTime. Well, really close, I condensed two spaces between the date and the hour into one space. The format string I built from the formats given in man strftime -- but if you aren't running on a Un*x (or OS X) box you can Google for the manpages easily enough.
There may very well be reasons you're not using strftime, I just wanted to make sure you're aware of the option.
In reply to Re: Newbie Q re: Undefined Value and "only used once" warnings
by Nkuvu
in thread Newbie Q re: Undefined Value and "only used once" warnings
by mikeatrcn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |