Category: perl (Page 3 of 4)

How to add HTML in Perl

Last updated on December 28th, 2022 at 09:25 amIn this tutorial we will see how to insert HTML within a perl script. This example below is just showcasing how a variable defined in perl can be called within an HTML page itself. We are just simple adding a variable named my $perl_var = “Load Me […]

How to find Operating System name using perl script

Last updated on April 27th, 2022 at 01:43 pmJust a very simple command to determine the operating system in which the script is running Output Use English module Print operating system name using english module Use Config module You can also use config module to find the operating system name Don’t have these modules installed […]

Ignore empty lines using perl

Last updated on February 22nd, 2022 at 11:29 amToday I would like to share an idea on how to skip blank lines or lines that have a ‘#’ at the start (or afterone or more white-space characters, i.e. spaces, tabs etc.): The tilda and dollar in between slashes is the regular expression, applied to try […]

How to read input from keyboard using perl

Last updated on February 14th, 2022 at 08:14 amThis script will show how to read numbers from keyboard and find the sum. To exit the program all you have to do is add 999. Here is the script. For your convenience I have added a sample output as well. Sample Output

« Older posts Newer posts »