How to initialize an array of String using Perl qw()
The perl function qw() is the simplest way by which strings can be initialized. my @day1 = (‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’); my @day2 = qw (Sunday Monday Tuesday Wednesday Thursday Friday Saturday); print $day1[6]; See how day1 and day2 are initialized. qw does not require each string to be declared in quotes [...]
How to initialize an array of Strings in Perl?
The simplest method to initialize a string in Perl
How to calculate the year of day in Perl
Day of the year is the number of days passed since January 1st of this year. localtime gives a lot of information like hours, minutes, seconds, month, day and year. It also returns day of the year
Unix time to Human Readable time using Perl localtime
Perl has a function time to get the current time. But the function returns the Epoch time, which is number of seconds that have passed since January 1 1970. Using function localtime, the unix time can be converted to human readable time