1. Perl
  2. Perl Features

Perl Features - A well - balanced language

Can you explain well what kind of characteristics Perl has? When discussing a language, I would like to write down the characteristics of the language Perl, which can be spoken at such times, where it is evaluated not only by its superficial appearance and reputation, but also by a well-thought-out engineer.

Ideal for text processing

Perl is the best scripting language for text processing. It automatically converts strings and numbers, the functions related to strings are easy to use, and regular expression are built into the language.

Text processing is a very frequently used process. Perl is designed to be optimized for text processing.

I think that tasks such as log formatting and aggregation often occur during system management. Perl is useful in such cases.

Easy to describe

Perl is one of the scripting languages. Perl types are dynamic, and function calls are also dynamic. Scripting languages are very easy to write for beginners, as they are less type-aware.

With trial and error, you can create a program by repeating the process of moving it and correcting mistakes.

C language and shell - like grammar

Perl's grammar is very similar to C's grammar. See how to use if, (), {} and for. Also, Perl is a Unix-born language, so the intention is to eliminate the inconveniences of the shell. In fact, the seemingly mysterious symbol $is inherited from the shell.

Also, although the identifiers use and my look special, linguist Larry Wall chose words that are easy for ordinary people to imagine. I think that my, not var, means that the program has a feeling that ordinary people use it on a daily basis.

Perl is a language that is designed to make people feel familiar with it.

No compilation work required, fast execution speed

Perl is a scripting language. When you run a Perl script, you don't have to compile it and it runs very fast. In the actual work, the program is modified and executed many times before it is completed. Perl is comfortable because it feels fast to run.

Static type languages with type inference tend to compile very slowly, but Perl is a language with dynamic types, so it compiles very fast.

Very high backward compatibility

Perl is a language that values backward compatibility. The current version 5 of Perl was released in 1998 and remains backwards compatible to date. It was released in a form that is almost compatible with the most recently released version 4 of Perl.

Perl is a reliable language for not breaking compatibility. The development community has a very strong interest in compatibility.

Unlike programs written as a hobby, applications used at work are used for a long period of time. In addition, a large number of programs will increase as functions are added.

That number could exceed 10,000. It is also often an important program that includes money calculations.

Perl is a very suitable scripting language for such situations. Perl's high compatibility contributes to the unbreakable nature of written programs. This is very attractive from a business point of view.

But then I'm wondering if Perl won't advance as a language. But take a look, there's nothing Perl can't do with other scripting languages. This means that Perl is a language that is backwards compatible, yet flexible and constantly improving. Perl is an ever-new language.

Internal implementation stability

Perl's internal implementation is very stable. It's unlikely that a different language version will change the internal implementation and create new issues.

If the internal implementation breaks down, extensions written in C/C ++ will not work. This means that C/C ++ bindings written by a third party will not work.

Perl has a very stable internal implementation, so libraries created by third parties can be operated very stably.

Abundant library

Perl has a rich library on a site on the Internet called CPAN. The libraries that exist on CPAN are extremely stable and easy to operate. If you use a combination of tools called perlbrew and cpanm, you can operate the library very stably.

Promise of support in the future

# Perl is promised to be supported in the future. There are many questions about what Perl6 is, but Perl6 is not a replacement or successor to Perl, it starts as a separate language. You can think of Perl6 as C 's position with respect to C. Perl itself is promised to be supported in the future.

Just as C language support isn't gone, so is Perl support.

Enrichment of documents on the Web

Perl is very well documented on the Web. Perl is a language that values backward compatibility, so you can copy and run examples of articles that existed on the Web in the past. This is a strong advantage of Perl for beginners.

In languages with broken backwards compatibility, web documentation is very difficult to use and you should always judge whether it is new or old. This is very confusing and annoying. In the case of Perl, the example written on the Web works as it is, which is very convenient.

Perl is a useful language for stacking library and document assets.


Perl's performance is optimized for text processing. The performance tuning of the language Perl isn't specialized in math, so Perl may look slow at some performances, partly because Perl is optimized for text processing. ..

Numerical computation is slower than static languages, but performance requirements can be solved by writing C/C ++ bindings.

For example, a Perl web server written with C/C ++ bindings performs as well as a static language.

Perl is designed to handle frequently used text processing properly, and to solve performance difficulties by writing C/C ++ bindings.

High responsiveness due to reference counting GC

Perl's GC method is a simple reference counting method. It is released when there are no more reference to the object. I have to manage cross-reference and circular reference myself, but the impact on performance is small.

The advantage of the reference counting method is that it does not lose its responsiveness even when many objects are created. Implementations that require Full GC will be less responsive when releasing a large number of objects.

This is called stop-the-world, and it may have a significant effect on real-time applications and web applications, but in the case of Perl, it is a reference counting method, so the responsiveness does not drop extremely. ..

Memory saving

Perl runs in a memory-saving scripting language. If you have a budget environment where you can add more memory, you don't have to worry too much about memory, but in reality, low memory usage is comfortable.

You can design very nicely using object orientation

Perl supports object orientation, so you can of course create classes. If you design well in classes, you can design the whole thing very neatly even in large-scale programming.

Installed by default in most Unix/Linux environments

Perl is a very popular language and is installed in most Linux/Unix environments. So, if you write a program in Perl, it's easy to distribute.

Support for Windows

Perl is also widely used in the Windows environment, so it has good support for Windows.

Wide range of applications from system management to web applications

Due to its high backward compatibility, Perl is a language that makes it easy to describe business-like long-term use and system-like parts. Perl is also an active language in the cutting edge of web applications. With Perl, you can write a system consistently, and you can operate programs with high maintainability and maintainability in a wide range of applications.

Perl has the original idea for scripting languages such as PHP, Python, and Ruby

There are languages like PHP, Python, and Ruby that came after Perl, but quite a few language design ideas are based on Perl. Without the idea of Larry Wall, these languages wouldn't have been possible.

PHP was originally written in Perl. Also, most of the linguistic ideas in Ruby and Python come from Perl. Perl serves as a source of scripting language ideas.

Of course, Perl itself is still major and active. Perl is the source of scripting language ideasIt would be interesting to remember that Izumi as a trivia.

Use Perl with confidence

Perl is a language with a good balance of many advantages. Well-maintained Perl source code is second to none in other languages. I think that maintaining and using Perl source code is often the most productive option.

I don't think you need to feel guilty to use Perl. Use Perl with confidence.

Related Informatrion