Share
Explore BrainMass

Perl

Developed in 1987 by a man named Larry Wall in order to make report processing easier, Perl is a family of programming languages, including most famously Perl 5 and Perl 6. Though it has gone through multiple revisions since its inception, it at heart a general purpose language, able to script for Unix systems at a higher level than C, etc. Some like to think of the name 'Perl' as an acronym -' Practical Extracting and Reporting Language'1, for example - yet it was simply chosen as it is a short word with positive connotations. Perl was almost called Gloria, after Wall's wife, but in the end Wall settled on PEARL, only to find such a language already existed, thus the unique spelling2.

Larry Wall with a big mustache and glasses before a convention

Larry Wall. Image Source: Wikimedia Commons

Though it is not as low-level as the C family, Perl shares much of its structure with it, including its procedural nature. Syntactically, the brace-delimited blocks, control structure, expressions, variables, assignment statements and subroutines of Perl will also be highly familiar to one trained in C, as will the language's capabilities with AWK and sed. One rather unique features of Perl is that its variables must be prefixed with a symbol upon their declaration to show their type. The examples below show scalar and array variable declaration in Perl:

my $scalar_variable;

my @array_variable;

Perl is especially useful in manipulating text files as these high-power text processing facilities allow it to operate past the arbitrary data-length limits many contemporary Unix tools are bound by.

 

References:

1. "perl(1): Practical Extraction/Report Language - Linux man page". Linux.die.net. Retrieved 2013-07-23.

2. Richardson, Marjorie (1999-05-01). "Larry Wall, the Guru of Perl". Linux Journal. Retrieved 2011-01-03.

The camel logo of the icon image was actually chosen by O'Reilley Media for their book Programming Perl but has since become heavily associated with the language and community. 

Analysis of AJAX Application Model

Is the Ajax application model really a good one for most software? Consider that, and the following quoted question, "Can an application model ever really be taken seriously which doesn't readily allow information storage on the local client or even access to your own software unless your Internet connection is working properly?

PERL: Creating a Script that Process the Data

New to PERL so I'm suppose to create a script that processes the data (name and number of hours worked during the month) submitted using an online form.The script calculates the number of weeks, days, and hours worked during the month, then displays the form data and the results of the calculations. I keep getting this compil

Perl Script to List Files in a Directory

I work in Unix environment. I have some file in my home directory. Some of the files are old and some new. I need Perl script using which I can get the following result. This is just an example: 19-Dec-2009 (Date) 20-DEC-2009 ( Date) ========= =============== ABC123 (n

Perl find: locating single file or multiple files

Please help with the following programming problem. I always use the following find command in Unix to locate one or several files: find / -name filename -type f 2>errormessage The Unix find command is very slow. It takes lot of time to get the required results. I was told Perl has one of the best find command. Plea

Web Site and Publishing Paper

Write a paper describing the steps involved in publishing a Web site. o Investigate two free and two fee-based options. o Explain which option you prefer and why. o Include any personal experience you may have publishing a Web site.

Future trends and professions in Information Technology

Locate information on technology trends or technology professions from an online search or a library search. Post your response to the following: Research future trends and professional opportunities in the Information Technology (IT) field. What opportunities are being created in the IT field as a result of the advancement o

Write separate Perl scripts for given file processing requirements.

Write separate Perl scripts for each of the given requirements. Mentioned input data files are attached with this posting. In each case command to run the script from the command line should look like: COMMAND_PROMPT> script_number.pl input_data_file.txt [1] A script script_1.pl that replaces each instance of "th" with "TH

Perl program update

Please apply the following formula below to the program so it works correctly! The following formula is used to calculate the fixed monthly payment (P) required to fully amortize a loan of L dollars over a term of n months at a monthly interest rate of c. [If the quoted rate is 6%, for example, c is .06/12 or .005]. P = L

Perl Program - Mortgage Calculator

Write a mortgage calculator PERL(.cgi) program that asks the user for the following information: 1. Loan amount 2. Number of years 3. Percent per year compound interest Use the following formula to determine the total amount of each payment: n = months * 12 r = percent per year compound interest L = loan amount P = Lr(1+

PERL Programming

When a user enters 101 for a temperature the program states the patient has expired which is not the correct response. How do I correct the problem. Thanks.

PERL Programming

I am having trouble in getting the sub bodytemp to validate correctly. For example if the user enters 102 for the temp the program will state the patient has expired which is not correct. (See attached file for full problem description)

PERL Programming

Although there is no hard number of lines for any function includeing your main function, people always feel that 15-20 lines per function should be the right size. Try to avoid very long functions and very large main. This negatively affects the readability of your program. With this being said my vital.cgi program is to lon

PERL programming

Add comment lines for the different sections. 1 $fruit1 = "pear"; 2 $fruit2 = "peaR"; 3 $result = $fruit1 gt $fruit2; 4 print "$resultn"; 5 $result = $fruit1 lt $fruit2; 6 print "resultn"; (Output) 4 1 6 0