Perl foreach is a general purpose programming language. It is mainly developed for text manipulation and it is now used for a wide range of tasks that include: web development, network programming, GUI development and system administration. Perl foreach is mainly intended to be practical and easy rather than it being beautiful. The major features are so easy to use because they support the procedural and object oriented programming.
Perl Foreach has very powerful built in support for mostly text processing and it has one of the most worlds most impressive collections of third party modules. The program for perl mainly consists of a sequence of declarations and statements which usually run from top to bottom. What allows you to jump around within the code are the loops, subordinates and other control measures.
The advantage of the perl is that it is a free form of language that you can be able to format and indent it they way you like. The white spaces are usually served to separate the tokens; it's not like the python where the white spaces are very vital in the part of the syntax. Another advantage about the Perl syntactic elements are optional.
Instead of putting parentheses in each and every function, you can leave explicit elements off and perl will figure out what it means. This method is normally known as Do What I Mean (DWIM). The downfall of this method is that it allows most programmers to be very lazy and also to use code in a style in which they are so comfortable with.
Perl usually borrows syntax and concepts from different languages like awk, sed, C, small talk, lisp and English. There are also some languages which have borrowed syntax from perl and particularly its regular expression extensions. If one is so vast and programmed in different types of languages you will see the words that are common in perl.
In Perl Foreach the only thing that you must declare are subordinates and the report formats. The variable is supposed to hold an undefined value until it is assigned a defined value and it is anything rather than a undef. When it is used as a number undef is usually treated like 0 and when it is used as a string, it is usually treated like an empty string, “”. These are some of the perl rules and they must be followed and observed.