Well, again... a silly use for perl. Couldn't resist...
Nah, don't upvote PLZ. The merits go to thezip, again, for his CB entry
my @T = lolcatime(time);
so grab one of his nodes to upvote. Ready? ok...
package lolcatime; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(lolcatime localtime); *localtime = \&lolcatime; sub lolcatime { my $foo; return wantarray ? CORE::localtime(shift||time) : uc((($foo=scalar(CORE::localtime(shift||time)))=~s/:(\d+) / /) && "$foo - i can haz ur $1 seconz?"); } 1;
perl -Mlolcatime -le 'print scalar lolcatime time' TUE JAN 6 03:41 2009 - I CAN HAZ UR 31 SECONZ?
kthxbye
--shmem
update: changed title, added sample usage
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: yet another time module
by Fletch (Bishop) on Jan 06, 2009 at 03:02 UTC | |
by jdporter (Paladin) on Jan 06, 2009 at 04:29 UTC | |
by pobocks (Chaplain) on Jan 12, 2009 at 16:36 UTC | |
|
Re: yet another time module
by Lawliet (Curate) on Jan 06, 2009 at 19:56 UTC |