in reply to split function
In addition, if you want more elaborate formatting, you can also look at strftime in POSIX. You can just pipe the results from localtime into it, like this:
use POSIX qw(strftime); my $format = "Current time minutes: %M, seconds: %S\n"; print strftime $format, localtime;
|
|---|