Mukul Latiyan has Published 330 Articles

How to check if a file exists in Perl?

Mukul Latiyan

Mukul Latiyan

Updated on 14-Mar-2023 18:05:09

In this tutorial, we will take a couple of examples and demonstrate how you can if a file exists or not, with the help of Perl. Let's suppose we have a simple text file called "sample.txt" with the following data − This is a sample txt file that contains some ... Read More

How to compare two arrays for equality in Perl?

Mukul Latiyan

Mukul Latiyan

Updated on 26-Dec-2022 16:44:26

In Perl, there are two ways to check if two arrays are equal. We can compare two arrays in Perl with the help of "Storable freeze" function or by creating our own custom function. In this tutorial, we will explore both these approaches with the help of examples. Example 1 ... Read More

How to check if a variable has a numeric value in Perl?

Mukul Latiyan

Mukul Latiyan

Updated on 26-Dec-2022 16:42:44

Suppose we get a variable at runtime in Perl and we want to check if the value that it contains is numeric or not, then we can use the two approaches shown in this tutorial. We will use two simple examples to demonstrate how it works. Example  The most basic ... Read More

How to check if a Perl hash already contains a key?

Mukul Latiyan

Mukul Latiyan

Updated on 26-Dec-2022 16:40:11

Let's consider a scenario where we would want to know if a Perl hash already contains a key or not. To do so in Perl, we can use the exists() function. In this tutorial, we will explore the exists function with the help of two examples. The exists() Function in ... Read More

How to check if a Perl array contains a particular value?

Mukul Latiyan

Mukul Latiyan

Updated on 26-Dec-2022 16:28:21

In Perl, we can check whether an array contains a particular value or not with the help of the "grep" keyword. The grep function in Perl is used to filter the input supplied in the function as a parameter out of the list of items. Similar to Linux, it uses ... Read More

How to break out of a loop in Perl?

Mukul Latiyan

Mukul Latiyan

Updated on 26-Dec-2022 16:23:22

In most programming languages, we can use the "break" keyword to break out of any type of loop. In Perl too, we have the "break" keyword available, but the keyword that is used the most to break out of a loop is the "last" keyword. The "last" Statement in Perl ... Read More

Voca: The Ultimate Javascript library for String Manipulation

Mukul Latiyan

Mukul Latiyan

Updated on 11-Oct-2022 14:24:39

Voca is a JavaScript library that is used for manipulating strings. In this tutorial, we will take multiple examples to show how you can use the different functions available in Voca. Features of Voca Before we see all the examples, let's highlight some features that Voca brings to the table ... Read More

Logging HTTP Requests and Errors using Morgan.js

Mukul Latiyan

Mukul Latiyan

Updated on 11-Oct-2022 14:18:24

Morgan is a middleware that is available for Node.js which is used when we want to log HTTP requests. It is mainly used in Express projects. Morgan helps us simplify the logging work of HTTP requests that come and sent from an application in a single statement. In normal situations, ... Read More

Best Command Line HTTP Client for Linux

Mukul Latiyan

Mukul Latiyan

Updated on 22-Jul-2022 08:47:56

In this tutorial, we will explore some of the most commonly used and famous HTTP clients that are present in Linux. A HTTP Client is a software that is mainly used to allow us to download files from the Internet. The primary reason for using HTTP clients is generally to ... Read More

How to Find Out File Types in Linux

Mukul Latiyan

Mukul Latiyan

Updated on 19-Jul-2022 15:03:50

When it comes to Linux operating system, everything in general can be considered as a file. In UNIX, in total, there are seven standard file types −FIFO specialBlock specialCharacter specialSocketRegularDirectorySymbolic linkWhen it comes to Files, these can be mainly categorized into the following categories −Regular FilesDirectory FilesSpecial FilesThe simplest way ... Read More

1 2 3 4 5 ... 33 Next
Advertisements