Perl Articles
Adjusting Date By Number Of Days
Unix system time is the number of seconds elapsed since January 1, 1970. To adjust a date by a certain number of days with Perl, convert the date to a system time number, adjust the system time number by 86400 for each day, then convert the result into a date. (86400 is the number of seconds in a day.)
Extracting Domain Name from URL with Perl
I oftentimes need to extract the domain name from a URL in the software I write. And I thought I would share my method.
Extracting First Name from Full Name
It's actually quite simple to extract the first name from a variable containing the full name.
When asked to type a list of domain names (as an example) into a textarea field, users might separate the domain names with a space, a comma, a semi-colon, a line feed, or a combination of those. You, as the programmer, as expected to write code that can make sense of that.
How To Calculate Leap Years with Perl
Programmers must not forget about leap years when programming dates. Certain rules apply.
Adjusting time forwards (and backwards) is easy with Perl.
Using Perl and Unix Commands To Find Directory Sizes
After mentioning there might be a handy Unix command to do the job, Phil did some research and provided working examples for readers, incorporating a Unix command in a Perl script to get directory sizes.
Using Perl Variable Values In JavaScript of Web Page Generated with Perl
We intermittently receive queries about how to use Perl variables within JavaScript. This would be JavaScript that's part of a web page generated/created by the Perl script.