Perl scripters,
Did you ever want to just grab the current year in four digit format without pulling in the entire localtime array? Me too. Here is a simple statement that does just that and nothing more. It pulls in the sixth element of the array which is the year. Don't forget, the array begins with index value 0 so the sixth element has an index value of 5.
$currentyear = (localtime)[5] + 1900;
Enjoy.
FSF is Now on Bluesky - But Won't Advocate Signing Up Due to Nonfree
JavaScript
-
The Free Software Foundation (FSF) is now on Bluesky, they announced this
week. But "We can't advocate that you sign up for a Bluesky account like we
do wi...
47 minutes ago

1 comment:
Exactly what I was looking for. Thanks!
Post a Comment