in reply to split function

If all you want is minutes and seconds of time of day, just look at localtime. You can easily extract minutes and seconds, as integers, from the return value in list context.

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;