Tag: perl (Page 1 of 4)

How to get current date and time using perl

Last updated on November 11th, 2024 at 11:31 amOne effective way to show the server’s date and time in Perl is by using the functions sprintf and localtime. While there are several ways to retrieve the date, I am choosing the simplest method to get the current date with Perl. We are also using strftime […]

How to redirect web page using Perl

Last updated on November 11th, 2024 at 02:12 pmWebsites sometimes need to send users to different places. For instance, in a Perl application, after a user logs in, if they are part of a certain group, they can be directed to the appropriate dashboard using Perl’s features. Here is the code. Shebang Line #!/usr/bin/perl: Variable […]

How to find file size using perl

Last updated on November 22nd, 2024 at 10:47 amScript works to check the size of a file passed as a command-line argument, provides its size in bytes or kilobytes and display it in KB (Kilo Bytes). To check the size of a file, you must provide the file name as an argument, and the script […]

How to make a HTTP get request in Perl

Last updated on April 19th, 2022 at 10:43 amThere are many methods in perl on how to send HTTP GET request and grab it on the targeted web page. Different modules are available which will allow us to get the requested variables easily. Here i am not going use any modules. Just a simple straight […]

« Older posts